From 9b47dd4a678e0afa46c8b7dd630dfa78483c1784 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 25 Jan 2023 12:25:34 +0800 Subject: [PATCH] b4bdd4f:开启TopNav没有子菜单隐藏侧边栏 --- yudao-ui-admin/src/components/TopNav/index.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yudao-ui-admin/src/components/TopNav/index.vue b/yudao-ui-admin/src/components/TopNav/index.vue index 98c4afe..02ca003 100644 --- a/yudao-ui-admin/src/components/TopNav/index.vue +++ b/yudao-ui-admin/src/components/TopNav/index.vue @@ -133,7 +133,9 @@ export default { } else { // 显示左侧联动菜单 this.activeRoutes(key); - this.$store.dispatch('app/toggleSideBarHide', false); + if (!this.$route.meta.link) { + this.$store.dispatch('app/toggleSideBarHide', false); + } } }, // 当前激活的路由 @@ -149,7 +151,7 @@ export default { if(routes.length > 0) { this.$store.commit("SET_SIDEBAR_ROUTERS", routes); } else { - this.$store.dispatch("app/toggleSideBarHide", true); + this.$store.dispatch('app/toggleSideBarHide', true); } }, ishttp(url) { -- libgit2 0.21.4