!254 解决处理顶级非目录路由的组件名称逻辑缺失的问题

Merge pull request !254 from clockdotnet/master_pr
This commit is contained in:
芋道源码 2023-10-03 02:27:37 +00:00 committed by Gitee
commit 04a94ad941
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -93,7 +93,10 @@ export const generateRoute = (routes: AppCustomRouteRecordRaw[]): AppRouteRecord
meta.alwaysShow = true
const childrenData: AppRouteRecordRaw = {
path: '',
name: toCamelCase(route.path, true),
name:
route.componentName && route.componentName.length > 0
? route.componentName
: toCamelCase(route.path, true),
redirect: route.redirect,
meta: meta
}