chore: v-access类型标注
This commit is contained in:
parent
c5fcf50c76
commit
1a6e5d22fd
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@ -222,5 +222,7 @@
|
|||||||
"vitest.disableWorkspaceWarning": true,
|
"vitest.disableWorkspaceWarning": true,
|
||||||
"cSpell.words": ["tinymce"],
|
"cSpell.words": ["tinymce"],
|
||||||
"typescript.tsdk": "node_modules/typescript/lib",
|
"typescript.tsdk": "node_modules/typescript/lib",
|
||||||
"editor.linkedEditing": true // 自动同步更改html标签
|
"editor.linkedEditing": true, // 自动同步更改html标签,
|
||||||
|
"vscodeCustomCodeColor.highlightValue": "v-access", // v-access显示的颜色
|
||||||
|
"vscodeCustomCodeColor.highlightValueColor": "#CCFFFF"
|
||||||
}
|
}
|
||||||
|
12
apps/web-antd/types/directive.d.ts
vendored
Normal file
12
apps/web-antd/types/directive.d.ts
vendored
Normal 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[]>;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user