From 0b3bbdb1666a447cf3ba7ed1430b76ba071e194a Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Thu, 13 Jul 2023 09:25:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E6=8E=A7=E5=88=B6sub?= =?UTF-8?q?-menus=E8=8F=9C=E5=8D=95=E6=98=AF=E5=90=A6=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/page/GlobalLayout.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: {