hgwms-2099 fix 路由
parent
26efca11f8
commit
eecfde90e5
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue