支持一级菜单(和主页同级)在main区域显示

This commit is contained in:
RuoYi
2020-05-26 14:33:45 +08:00
parent c1db17dd77
commit bb1324a70a
3 changed files with 65 additions and 4 deletions

View File

@ -32,6 +32,10 @@ const permission = {
// 遍历后台传来的路由字符串,转换为组件对象
function filterAsyncRouter(asyncRouterMap) {
return asyncRouterMap.filter(route => {
if(!route.path){
// 防止空路由出现的警告设置默认path
route.path = '/path';
}
if (route.component) {
// Layout组件特殊处理
if (route.component === 'Layout') {