列权限添加

This commit is contained in:
sheng
2023-09-11 12:02:29 +08:00
committed by 李强
parent ad6ec5ca58
commit 94815f4b20
7 changed files with 121 additions and 30 deletions

View File

@@ -0,0 +1,9 @@
import { useColumnPermission } from '/@/stores/columnPermission';
type permissionType = 'is_create' | 'is_query' | 'is_update';
export const columnPermission = (key: string, type: permissionType): boolean => {
const permissions = useColumnPermission().permission || [];
return !!permissions.some((i) => i.field_name === key && i[type]);
};