mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-16 06:10:24 +08:00
refactor: 前端统一使用prettier格式化&枚举值统一管理
This commit is contained in:
@@ -3,7 +3,7 @@ import { useUserInfo } from '@/store/userInfo';
|
||||
/**
|
||||
* 判断当前用户是否拥有指定权限
|
||||
* @param code 权限code
|
||||
* @returns
|
||||
* @returns
|
||||
*/
|
||||
export function hasPerm(code: string) {
|
||||
return useUserInfo().userInfo.permissions.some((v: any) => v === code);
|
||||
@@ -22,4 +22,4 @@ export function hasPerms(permCodes: any[]) {
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user