mirror of
https://gitee.com/log4j/pig-ui.git
synced 2024-12-23 05:40:20 +08:00
♻️ Refactoring code. 修改面包屑路径没有最后一层的问题
This commit is contained in:
parent
229ce1f60b
commit
9e719d04c4
@ -90,6 +90,7 @@ const initRouteSplit = (path: string) => {
|
||||
state.routeSplitFirst = `/${state.routeSplit[0]}`;
|
||||
state.routeSplitIndex = 1;
|
||||
getBreadcrumbList(routesList.value);
|
||||
state.breadcrumbList.push(route)
|
||||
|
||||
if (route.name === 'home' || (route.name === 'notFound' && state.breadcrumbList.length > 1)) state.breadcrumbList.shift();
|
||||
if (state.breadcrumbList.length > 0)
|
||||
|
@ -138,6 +138,9 @@ export function backEndComponent(routes: any) {
|
||||
item.component = dynamicImport(dynamicViewsModules, item.path as string);
|
||||
}
|
||||
item.children && backEndComponent(item.children);
|
||||
if(item.children){
|
||||
item.redirect = item.children[0].path
|
||||
}
|
||||
return item;
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user