diff --git a/ruoyi-ui/src/store/modules/permission.js b/ruoyi-ui/src/store/modules/permission.js index bfd598865..deed45193 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 f4933faab..d8562a351 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; }