'admin-21.12.07:修复router/index.ts中hasRoles未同步master,感谢@小刘'
This commit is contained in:
parent
6de2a537c3
commit
1ef8ca8757
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue