chore: v-access类型标注

This commit is contained in:
dap
2024-10-11 20:58:59 +08:00
parent c5fcf50c76
commit 1a6e5d22fd
2 changed files with 15 additions and 1 deletions

12
apps/web-antd/types/directive.d.ts vendored Normal file
View File

@@ -0,0 +1,12 @@
import type { Directive } from 'vue';
declare module 'vue' {
export interface ComponentCustomProperties {
/**
* 判断权限: v-access:code=""
* 判断角色 v-access:role=""
* TODO: 泛型第四个函数为code或role 不生效
*/
vAccess: Directive<Element, string | string[]>;
}
}