Skip to content

Commit fdde538

Browse files
committed
b4bdd4f:开启TopNav没有子菜单隐藏侧边栏
1 parent 4bbe052 commit fdde538

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/TopNav/index.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ export default {
133133
} else {
134134
// 显示左侧联动菜单
135135
this.activeRoutes(key);
136-
this.$store.dispatch('app/toggleSideBarHide', false);
136+
if (!this.$route.meta.link) {
137+
this.$store.dispatch('app/toggleSideBarHide', false);
138+
}
137139
}
138140
},
139141
// 当前激活的路由
@@ -149,7 +151,7 @@ export default {
149151
if(routes.length > 0) {
150152
this.$store.commit("SET_SIDEBAR_ROUTERS", routes);
151153
} else {
152-
this.$store.dispatch("app/toggleSideBarHide", true);
154+
this.$store.dispatch('app/toggleSideBarHide', true);
153155
}
154156
},
155157
ishttp(url) {

0 commit comments

Comments
 (0)