'admin-21.12.07:修复router/index.ts中hasRoles未同步master,感谢@小刘'

This commit is contained in:
lyt 2021-12-07 20:23:17 +08:00
parent 6de2a537c3
commit 1ef8ca8757
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ export function setCacheTagsViewRoutes() {
* @returns
*/
export function hasRoles(roles: any, route: any) {
if (route.meta && route.meta.auth) return roles.some((role: any) => route.meta.roles.includes(role));
if (route.meta && route.meta.roles) return roles.some((role: any) => route.meta.roles.includes(role));
else return true;
}