mirror of
https://github.com/veops/cmdb.git
synced 2025-08-08 17:36:28 +08:00
fix(ui):common double menu (#324)
This commit is contained in:
@@ -38,7 +38,7 @@ async function filterAsyncRouter(routerMap, roles) {
|
|||||||
const default_route = ['company_info', 'company_structure', 'company_group']
|
const default_route = ['company_info', 'company_structure', 'company_group']
|
||||||
if (default_route.includes(route.name)) {
|
if (default_route.includes(route.name)) {
|
||||||
filteredRoutes.push(route)
|
filteredRoutes.push(route)
|
||||||
}
|
} else {
|
||||||
await hasPermission(roles.permissions, route).then(async flag => {
|
await hasPermission(roles.permissions, route).then(async flag => {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
if (route.children && route.children.length) {
|
if (route.children && route.children.length) {
|
||||||
@@ -48,6 +48,7 @@ async function filterAsyncRouter(routerMap, roles) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return filteredRoutes
|
return filteredRoutes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user