From 67fd4a19de483e982083819b89712bc6d460ae20 Mon Sep 17 00:00:00 2001 From: YUJT Date: Thu, 14 Apr 2022 15:59:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E5=87=BB=E7=88=B6=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=EF=BC=8C=E4=B9=9F=E5=8F=AF=E4=BB=A5=E6=B8=B2=E6=9F=93=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 4 +++- src/views/main-sidebar-sub-menu.vue | 10 ++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 2a276506..9030ff03 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -93,7 +93,9 @@ function fnAddDynamicMenuRoutes (menuList = [], routes = []) { for (var i = 0; i < menuList.length; i++) { if (menuList[i].children && menuList[i].children.length >= 1) { temp = temp.concat(menuList[i].children) - continue + if (!menuList[i].url) { + continue + } } // 组装路由 var route = { diff --git a/src/views/main-sidebar-sub-menu.vue b/src/views/main-sidebar-sub-menu.vue index 332e8535..9988aeeb 100644 --- a/src/views/main-sidebar-sub-menu.vue +++ b/src/views/main-sidebar-sub-menu.vue @@ -1,9 +1,11 @@