forked from imengyu/vue3-context-menu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
106 lines (101 loc) · 1.91 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import { App } from "vue";
declare module 'vue3-context-menu' {
}
export declare interface MenuOptions {
/**
* The items for this menu.
*/
items : MenuItem[],
/**
* Menu display x position.
*/
x: number,
/**
* Menu display y position.
*/
y: number,
/**
* X-coordinate offset of submenu and parent menu.
*/
xOffset ?: number,
/**
* Y-coordinate offset of submenu and parent menu.
*/
yOffset ?: number,
/**
* The z-index of this menu.
*/
zIndex ?: number,
/**
* Custom menu class.
*/
customClass ?: string,
/**
* Custom icon library font class name.
*/
iconFontClass ?: string,
/**
* Maximum width of main menu (in pixels)
*/
maxWidth ?: number,
/**
* Minimum width of main menu (pixels)
*/
minWidth ?: number,
}
export declare interface MenuItem {
/**
* The label of menu.
*/
label ?: string,
/**
* The icon for menu item.
*/
icon ?: string,
/**
* Disable menu item?
*/
disabled ?: boolean,
/**
* Is this menu item separated from the menu item below?
*/
divided ?: boolean,
/**
* Custom submenu class
*/
customClass ?: string,
/**
* Submenu maximum width (in pixels).
*/
maxWidth ?: number,
/**
* Submenu minimum width (in pixels).
*/
minWidth ?: number,
/**
* Menu item click event handler.
*/
onClick ?: () => void,
/**
* Submenu items.
*/
children ?: MenuItem[],
}
declare module '@vue/runtime-core' {
export interface ComponentCustomProperties {
/**
* Show a ContextMenu .
* @param options The options of this ContextMenu
*/
$contextmenu: (options : MenuOptions) => void;
}
}
declare const Plugin: {
install: (app: App<Element>) => void
/**
* Show a ContextMenu in page, same as `this.$contextmenu`
* @param options The options of ContextMenu
*/
showContextMenu(options : MenuOptions) : void;
};
export default Plugin;