diff --git a/src/components/page/GlobalLayout.vue b/src/components/page/GlobalLayout.vue index 7505b0c..6bd687b 100644 --- a/src/components/page/GlobalLayout.vue +++ b/src/components/page/GlobalLayout.vue @@ -90,7 +90,9 @@ // 当前页面子路由 currentChildrenMenus () { - return this.findSubMenus(this.$route.name) + const hasSubmenuPathList = ['/isystem', '/system'] // 需要显示二级菜单的路由列表(仅需一级菜单路由) + const hasSubMenu = hasSubmenuPathList.some(item => this.$route.path.indexOf(item) == 0) + return hasSubMenu? this.findSubMenus(this.$route.name): [] } }, watch: {