Browse Source
fix(router): the issue of blank page navigation during repair of non-LAYOUT first-level route component (#3764)
pull/3770/head
Zhong
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
0 deletions
-
src/router/helper/routeHelper.ts
|
|
|
@ -84,6 +84,8 @@ export function transformObjToRoute<T = AppRouteModule>(routeList: AppRouteModul |
|
|
|
warn('找不到菜单对应的name, 请检查数据!' + JSON.stringify(route)); |
|
|
|
} |
|
|
|
route.name = `${route.name}Parent`; |
|
|
|
// 重定向到当前路由,以防空白页面
|
|
|
|
route.redirect = route.path; |
|
|
|
route.path = ''; |
|
|
|
const meta = route.meta || {}; |
|
|
|
meta.single = true; |
|
|
|
|