mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 迁移登录完成
This commit is contained in:
@ -40,12 +40,18 @@ export function transformAuthRouteToVueRoute(item: AuthRoute.Route) {
|
||||
consoleError('路由组件解析失败: ', item);
|
||||
}
|
||||
}
|
||||
|
||||
if (hasProps(item) && !isSingleRoute(item)) {
|
||||
(itemRoute as any).props = item.props;
|
||||
}
|
||||
|
||||
if (isSingleRoute(item)) {
|
||||
itemRoute.children = [
|
||||
{
|
||||
path: '',
|
||||
name: item.name,
|
||||
component: getViewComponent(item.name)
|
||||
component: getViewComponent(item.name),
|
||||
props: hasProps(item) ? item.props : undefined
|
||||
}
|
||||
];
|
||||
} else if (hasChildren(item)) {
|
||||
@ -67,6 +73,10 @@ function hasChildren(item: AuthRoute.Route) {
|
||||
return Boolean(item.children && item.children.length);
|
||||
}
|
||||
|
||||
function hasProps(item: AuthRoute.Route) {
|
||||
return Boolean(item.props);
|
||||
}
|
||||
|
||||
function isSingleRoute(item: AuthRoute.Route) {
|
||||
return Boolean(item.meta.single);
|
||||
}
|
||||
|
Reference in New Issue
Block a user