-
Notifications
You must be signed in to change notification settings - Fork 18
/
index.d.ts
50 lines (43 loc) · 1.53 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
type menusItemType = {
key?: string;
label: string|((key?: string) => string);
style?: {
[key: string]: string | number
}
icon?: string|((key?: string) => string)|unknown;
disabled?: boolean|((key?: string) => boolean);
divided?: boolean|((key?: string) => boolean);
enter?: (menu: menusItemType, args: unknown) => unknown;
click?: (menu: menusItemType, args: unknown) => unknown;
children?: Array<menusItemType>;
tip?: string|((key?: string) => string);
hidden?: boolean|((key?: string) => boolean);
}
type menusType = {
menus: Array<menusItemType>;
menusClass?: string;
itemClass?: string;
minWidth?: number | string;
maxWidth?: number | string;
zIndex?: number | string;
direction?: "left" | "right";
}
type componentMenusType = menusType & {
event: MouseEvent;
open: boolean;
args?: unknown
}
declare module 'vue3-menus' {
export const Vue3Menus: import('vue').DefineComponent<componentMenusType, componentMenusType, componentMenusType, componentMenusType, componentMenusType,
componentMenusType, componentMenusType, componentMenusType, componentMenusType, componentMenusType, componentMenusType, componentMenusType>;
export const menusEvent: (event: MouseEvent, menus: menusType | Array<menusItemType>, args: unknown) => void;
export const directive: import('vue').Directive<any, menusType | Array<menusItemType>>;
const install: (app: import('vue').App, options: {
name: string
}) => unknown;
export default install;
}
export {
menusType,
menusItemType
}