Skip to content

Commit

Permalink
fix: 使用动态路由时,多级路由只有一个子路且父路由未使用alwaysShow时,子路由未添加至路由中
Browse files Browse the repository at this point in the history
  • Loading branch information
renchao8697 committed Apr 12, 2023
1 parent 4216ab8 commit 9b330a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/routerHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const generateRoutesFn1 = (
if (isUrl(item) && (onlyOneChild === item || route.path === item)) {
data = Object.assign({}, route)
} else {
const routePath = pathResolve(basePath, onlyOneChild || route.path)
const routePath = onlyOneChild ?? pathResolve(basePath, route.path)
if (routePath === item || meta.followRoute === item) {
data = Object.assign({}, route)
}
Expand Down

0 comments on commit 9b330a1

Please sign in to comment.