From 8128c318dcc66dc0bf8ff9ed94e215bce395862c Mon Sep 17 00:00:00 2001 From: YUJT Date: Thu, 14 Apr 2022 15:59:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=88=B6=E6=A0=87=E7=AD=BE=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E6=89=93=E5=BC=80=E9=A1=B5=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 5ed9d852..5d1b885f 100644 --- a/src/views/main-sidebar-sub-menu.vue +++ b/src/views/main-sidebar-sub-menu.vue @@ -1,9 +1,11 @@