Commit b5c789a2670558453821dbaff039529681c13a5b

Authored by RuoYi
1 parent bb1324a7

防止空路由出现的警告,设置默认path=/

ruoyi-ui/src/store/modules/permission.js
... ... @@ -32,10 +32,6 @@ const permission = {
32 32 // 遍历后台传来的路由字符串,转换为组件对象
33 33 function filterAsyncRouter(asyncRouterMap) {
34 34 return asyncRouterMap.filter(route => {
35   - if(!route.path){
36   - // 防止空路由出现的警告,设置默认path
37   - route.path = '/path';
38   - }
39 35 if (route.component) {
40 36 // Layout组件特殊处理
41 37 if (route.component === 'Layout') {
... ...
ruoyi/src/main/java/com/ruoyi/project/system/service/impl/SysMenuServiceImpl.java
... ... @@ -317,7 +317,7 @@ public class SysMenuServiceImpl implements ISysMenuService
317 317 // 非外链并且是一级目录(类型为菜单)
318 318 else if (isMeunFrame(menu))
319 319 {
320   - routerPath = StringUtils.EMPTY;
  320 + routerPath = "/";
321 321 }
322 322 return routerPath;
323 323 }
... ...