Commit 9b47dd4a678e0afa46c8b7dd630dfa78483c1784

Authored by YunaiV
1 parent 179fdc84

b4bdd4f:开启TopNav没有子菜单隐藏侧边栏

yudao-ui-admin/src/components/TopNav/index.vue
@@ -133,7 +133,9 @@ export default { @@ -133,7 +133,9 @@ export default {
133 } else { 133 } else {
134 // 显示左侧联动菜单 134 // 显示左侧联动菜单
135 this.activeRoutes(key); 135 this.activeRoutes(key);
136 - this.$store.dispatch('app/toggleSideBarHide', false); 136 + if (!this.$route.meta.link) {
  137 + this.$store.dispatch('app/toggleSideBarHide', false);
  138 + }
137 } 139 }
138 }, 140 },
139 // 当前激活的路由 141 // 当前激活的路由
@@ -149,7 +151,7 @@ export default { @@ -149,7 +151,7 @@ export default {
149 if(routes.length > 0) { 151 if(routes.length > 0) {
150 this.$store.commit("SET_SIDEBAR_ROUTERS", routes); 152 this.$store.commit("SET_SIDEBAR_ROUTERS", routes);
151 } else { 153 } else {
152 - this.$store.dispatch("app/toggleSideBarHide", true); 154 + this.$store.dispatch('app/toggleSideBarHide', true);
153 } 155 }
154 }, 156 },
155 ishttp(url) { 157 ishttp(url) {