Commit 9679a6df by chenting Committed by Gitee

fix: 修复单个顶级菜单加载报错的问题

修复 https://gitee.com/yudaocode/yudao-ui-admin-vue3/issues/IBRPG0
并兼容 https://gitee.com/yudaocode/yudao-ui-admin-vue3/issues/IB9N2J

Signed-off-by: chenting <1016830869@qq.com>
parent b63179ef
...@@ -100,6 +100,9 @@ export const generateRoute = (routes: AppCustomRouteRecordRaw[]): AppRouteRecord ...@@ -100,6 +100,9 @@ export const generateRoute = (routes: AppCustomRouteRecordRaw[]): AppRouteRecord
//处理顶级非目录路由 //处理顶级非目录路由
if (!route.children && route.parentId == 0 && route.component) { if (!route.children && route.parentId == 0 && route.component) {
data.component = Layout data.component = Layout
data.meta = {
hidden: meta.hidden,
}
data.name = toCamelCase(route.path, true) + 'Parent' data.name = toCamelCase(route.path, true) + 'Parent'
data.redirect = '' data.redirect = ''
meta.alwaysShow = true meta.alwaysShow = true
......
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 sign in to comment