Commit e0bc260f by preschooler

🎈 perf:优化路由目录判断

parent 6dc5f5dc
...@@ -120,7 +120,7 @@ export const generateRoute = (routes: AppCustomRouteRecordRaw[]): AppRouteRecord ...@@ -120,7 +120,7 @@ export const generateRoute = (routes: AppCustomRouteRecordRaw[]): AppRouteRecord
data.children = [childrenData] data.children = [childrenData]
} else { } else {
// 目录 // 目录
if (route.children) { if (route.children?.length) {
data.component = Layout data.component = Layout
data.redirect = getRedirect(route.path, route.children) data.redirect = getRedirect(route.path, route.children)
// 外链 // 外链
......
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