Commit d983f8bc authored by 张俊's avatar 张俊

菜单资源路径调整

parent e61d5c0e
......@@ -284,19 +284,32 @@ var menuToRouter = (menu) => {
e.component = () => import("../page/parent/parent.vue");
menuToRouter(e.children);
} else if (e.children && e.menuType !== 0) {
console.log(`@/page/main${e.path}/index.vue`);
//叶子层级需要加载到对应文件
//对首页做兼容
e.component = getViews(e.path);
if(e.source){
console.log(`@/page/main${e.source}/index.vue`);
e.component = getViews(e.source);
}else{
console.log(`@/page/main${e.path}/index.vue`);
e.component = getViews(e.path);
}
menuToRouter(e.children);
} else {
console.log(`@/page/main${e.path}/index.vue`);
//叶子层级需要加载到对应文件
//对首页做兼容
if (e.path == "/") {
e.component = () => import("../page/main/index/index.vue");
if(e.source){
e.component = () => import(`../page/main/${e.source}/index.vue`);
}else{
e.component = () => import("../page/main/index/index.vue");
}
} else {
e.component = getViews(e.path);
if(e.source){
e.component = getViews(e.source);
}else{
e.component = getViews(e.path);
}
}
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment