From 0b37b54910ade2450b7f7ba83748131da0256166 Mon Sep 17 00:00:00 2001
From: Nuro <1617285096@qq.com>
Date: Tue, 21 Mar 2023 20:18:41 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BB=84=E4=BB=B6?=
=?UTF-8?q?=E7=BC=93=E5=AD=98=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/layout/components/LayoutMain/index.vue | 4 ++--
src/router/modules/project.router.ts | 7 +++++++
.../project/layout/components/ProjectLayoutSider/index.vue | 3 +--
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/layout/components/LayoutMain/index.vue b/src/layout/components/LayoutMain/index.vue
index 9c9d9a2a..62737471 100644
--- a/src/layout/components/LayoutMain/index.vue
+++ b/src/layout/components/LayoutMain/index.vue
@@ -2,12 +2,12 @@
-
+
diff --git a/src/router/modules/project.router.ts b/src/router/modules/project.router.ts
index 45f51f15..5d0b8e0b 100644
--- a/src/router/modules/project.router.ts
+++ b/src/router/modules/project.router.ts
@@ -46,4 +46,11 @@ const projectRoutes: RouteRecordRaw = {
]
}
+projectRoutes.children?.forEach(child => {
+ child.meta = {
+ ...child.meta,
+ key: 'reuse-project'
+ }
+})
+
export default projectRoutes
diff --git a/src/views/project/layout/components/ProjectLayoutSider/index.vue b/src/views/project/layout/components/ProjectLayoutSider/index.vue
index c7b963e0..e84a00f8 100644
--- a/src/views/project/layout/components/ProjectLayoutSider/index.vue
+++ b/src/views/project/layout/components/ProjectLayoutSider/index.vue
@@ -45,8 +45,7 @@ const collapsed = ref(false)
const { getAsideCollapsedWidth } = toRefs(useSettingStore())
const route = useRoute()
-const routeRame = computed(() => route.name)
-const menuValue = ref(routeRame)
+const menuValue = computed(() => route.name)
const menuOptions = menuOptionsInit()