mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 18:40:22 +08:00
chore(routeHelper): [Fixes #3217] remove undefined property
This commit is contained in:
parent
beed7f2e11
commit
4de756aa2d
@ -78,11 +78,12 @@ export function transformObjToRoute<T = AppRouteModule>(routeList: AppRouteModul
|
|||||||
} else {
|
} else {
|
||||||
route.children = [cloneDeep(route)];
|
route.children = [cloneDeep(route)];
|
||||||
route.component = LAYOUT;
|
route.component = LAYOUT;
|
||||||
|
|
||||||
//某些情况下如果name如果没有值, 多个一级路由菜单会导致页面404
|
//某些情况下如果name如果没有值, 多个一级路由菜单会导致页面404
|
||||||
if (!route.name || !route.menuName) {
|
if (!route.name) {
|
||||||
warn('找不到菜单对应的name或menuName, 请检查数据!');
|
warn('找不到菜单对应的name, 请检查数据!' + JSON.stringify(route));
|
||||||
}
|
}
|
||||||
route.name = `${route.name || route.menuName}Parent`;
|
route.name = `${route.name}Parent`;
|
||||||
route.path = '';
|
route.path = '';
|
||||||
const meta = route.meta || {};
|
const meta = route.meta || {};
|
||||||
meta.single = true;
|
meta.single = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user