fix(ui):common double menu (#324)

This commit is contained in:
wang-liang0615 2023-12-21 14:59:39 +08:00 committed by GitHub
parent 75122f7a40
commit 3e2943b49e
1 changed files with 9 additions and 8 deletions

View File

@ -38,7 +38,7 @@ async function filterAsyncRouter(routerMap, roles) {
const default_route = ['company_info', 'company_structure', 'company_group']
if (default_route.includes(route.name)) {
filteredRoutes.push(route)
}
} else {
await hasPermission(roles.permissions, route).then(async flag => {
if (flag) {
if (route.children && route.children.length) {
@ -48,6 +48,7 @@ async function filterAsyncRouter(routerMap, roles) {
}
})
}
}
return filteredRoutes
}