From b5c789a2670558453821dbaff039529681c13a5b Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 26 May 2020 18:22:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E7=A9=BA=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=9A=84=E8=AD=A6=E5=91=8A=EF=BC=8C=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=BB=98=E8=AE=A4path=3D/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/store/modules/permission.js | 4 ---- .../ruoyi/project/system/service/impl/SysMenuServiceImpl.java | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/ruoyi-ui/src/store/modules/permission.js b/ruoyi-ui/src/store/modules/permission.js index bfd5988..deed451 100644 --- a/ruoyi-ui/src/store/modules/permission.js +++ b/ruoyi-ui/src/store/modules/permission.js @@ -32,10 +32,6 @@ const permission = { // 遍历后台传来的路由字符串,转换为组件对象 function filterAsyncRouter(asyncRouterMap) { return asyncRouterMap.filter(route => { - if(!route.path){ - // 防止空路由出现的警告,设置默认path - route.path = '/path'; - } if (route.component) { // Layout组件特殊处理 if (route.component === 'Layout') { diff --git a/ruoyi/src/main/java/com/ruoyi/project/system/service/impl/SysMenuServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/system/service/impl/SysMenuServiceImpl.java index f4933fa..d8562a3 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/system/service/impl/SysMenuServiceImpl.java +++ b/ruoyi/src/main/java/com/ruoyi/project/system/service/impl/SysMenuServiceImpl.java @@ -317,7 +317,7 @@ public class SysMenuServiceImpl implements ISysMenuService // 非外链并且是一级目录(类型为菜单) else if (isMeunFrame(menu)) { - routerPath = StringUtils.EMPTY; + routerPath = "/"; } return routerPath; }