Optimize router

This commit is contained in:
2023-12-04 14:09:32 +08:00
parent 406c362f84
commit 6ff5e11f9d

View File

@@ -22,7 +22,9 @@ export const getAuthRoute = (
return route return route
.filter( .filter(
(value) => (value) =>
!(value.permission || parentPermission) || hasPathPermission(value.absolutePath) value.path === '*' ||
!(value.permission || parentPermission) ||
hasPathPermission(value.absolutePath)
) )
.map((value) => { .map((value) => {
if (value.children) { if (value.children) {