From 085fccd67d4e1647cde9bd6c38c9d6e30cbf0185 Mon Sep 17 00:00:00 2001
From: hooray <304327508@qq.com>
Date: Sat, 13 Nov 2021 10:44:02 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=9D=A2=E5=8C=85=E5=B1=91?=
=?UTF-8?q?=E5=AF=BC=E8=88=AA=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/layout/components/Search/index.vue | 9 ++++++---
src/layout/components/Topbar/index.vue | 8 +-------
src/store/modules/menu.js | 4 ++--
3 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/src/layout/components/Search/index.vue b/src/layout/components/Search/index.vue
index cabbabb6..bdc95e96 100644
--- a/src/layout/components/Search/index.vue
+++ b/src/layout/components/Search/index.vue
@@ -37,7 +37,7 @@
{{ bc }}
-
+
{{ item.path }}
@@ -347,8 +347,11 @@ function scrollTo(offsetTop) {
@include text-overflow(1, true);
}
.breadcrumb {
- span:last-child i {
- display: none;
+ span {
+ margin-right: 5px;
+ &:last-child i {
+ display: none;
+ }
}
}
}
diff --git a/src/layout/components/Topbar/index.vue b/src/layout/components/Topbar/index.vue
index 76cb9472..febbb8ee 100644
--- a/src/layout/components/Topbar/index.vue
+++ b/src/layout/components/Topbar/index.vue
@@ -43,13 +43,7 @@ const breadcrumbList = computed(() => {
})
}
if (route.meta.breadcrumbNeste) {
- route.meta.breadcrumbNeste.map((item, index) => {
- let tmpItem = deepClone(item)
- if (index != 0) {
- tmpItem.path = `${route.meta.breadcrumbNeste[0].path}/${item.path}`
- }
- breadcrumbList.push(tmpItem)
- })
+ breadcrumbList.push(...deepClone(route.meta.breadcrumbNeste))
}
return breadcrumbList
})
diff --git a/src/store/modules/menu.js b/src/store/modules/menu.js
index 4b6a143b..669b4951 100644
--- a/src/store/modules/menu.js
+++ b/src/store/modules/menu.js
@@ -191,7 +191,7 @@ const actions = {
item.children = flatAsyncRoutes(item.children, [{
path: item.path,
title: item.meta.title
- }])
+ }], item.path)
}
})
commit('setDefaultOpenedPaths', routes)
@@ -224,7 +224,7 @@ const actions = {
item.children = flatAsyncRoutes(item.children, [{
path: item.path,
title: item.meta.title
- }])
+ }], item.path)
}
})
commit('setDefaultOpenedPaths', routes)