refactor: ♻️ 项目重构(临时提交)

Former-commit-id: 14e64324f7556c095c38ad289690367cdac0ec56
This commit is contained in:
郝先瑞
2023-11-16 22:46:28 +08:00
parent c1725e0b09
commit 12c78f96d7
34 changed files with 2129 additions and 399 deletions

View File

@@ -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);
}
});
}