refactor: ♻️ 项目重构(临时提交)
Former-commit-id: 14e64324f7556c095c38ad289690367cdac0ec56
This commit is contained in:
@@ -21,8 +21,8 @@ const hasPermission = (roles: string[], route: RouteRecordRaw) => {
|
||||
return true;
|
||||
}
|
||||
return roles.some((role) => {
|
||||
if (route.meta?.roles !== undefined) {
|
||||
return (route.meta.roles as string[]).includes(role);
|
||||
if (route.meta?.roles) {
|
||||
return route.meta.roles.includes(role);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user