Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
b5c789a2
Commit
b5c789a2
authored
May 26, 2020
by
RuoYi
Browse files
防止空路由出现的警告,设置默认path=/
parent
bb1324a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
ruoyi-ui/src/store/modules/permission.js
View file @
b5c789a2
...
...
@@ -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
'
)
{
...
...
ruoyi/src/main/java/com/ruoyi/project/system/service/impl/SysMenuServiceImpl.java
View file @
b5c789a2
...
...
@@ -317,7 +317,7 @@ public class SysMenuServiceImpl implements ISysMenuService
// 非外链并且是一级目录(类型为菜单)
else
if
(
isMeunFrame
(
menu
))
{
routerPath
=
StringUtils
.
EMPTY
;
routerPath
=
"/"
;
}
return
routerPath
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment