hgwms-2099 fix 路由

hwork-master
A0066811 2025-11-13 10:56:19 +08:00
parent 26efca11f8
commit eecfde90e5
1 changed files with 1 additions and 1 deletions

View File

@ -45,12 +45,12 @@ export const generatePower = (powers) => {
export const setUserRouteComponent = routes => {
routes.forEach(r => {
r.component = r.parent == '0' ? permissionRoutes.Layout : getPermissionRoutes(r.component)
if(r.component==undefined){
r.component = permissionRoutes['error-404']
}
if (r.children && r.children.length > 0) {
setUserRouteComponent(r.children)
if (r.parent !== '0') r.component = undefined
}
})
}