防止空路由出现的警告,设置默认path=/
This commit is contained in:
parent
bb1324a70a
commit
b5c789a267
@ -32,10 +32,6 @@ const permission = {
|
|||||||
// 遍历后台传来的路由字符串,转换为组件对象
|
// 遍历后台传来的路由字符串,转换为组件对象
|
||||||
function filterAsyncRouter(asyncRouterMap) {
|
function filterAsyncRouter(asyncRouterMap) {
|
||||||
return asyncRouterMap.filter(route => {
|
return asyncRouterMap.filter(route => {
|
||||||
if(!route.path){
|
|
||||||
// 防止空路由出现的警告,设置默认path
|
|
||||||
route.path = '/path';
|
|
||||||
}
|
|
||||||
if (route.component) {
|
if (route.component) {
|
||||||
// Layout组件特殊处理
|
// Layout组件特殊处理
|
||||||
if (route.component === 'Layout') {
|
if (route.component === 'Layout') {
|
||||||
|
@ -317,7 +317,7 @@ public class SysMenuServiceImpl implements ISysMenuService
|
|||||||
// 非外链并且是一级目录(类型为菜单)
|
// 非外链并且是一级目录(类型为菜单)
|
||||||
else if (isMeunFrame(menu))
|
else if (isMeunFrame(menu))
|
||||||
{
|
{
|
||||||
routerPath = StringUtils.EMPTY;
|
routerPath = "/";
|
||||||
}
|
}
|
||||||
return routerPath;
|
return routerPath;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user