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