1 | import { RenderFunction, SetupContext, Ref, ComponentPublicInstance } from 'vue'
|
2 | import { VXEComponent, VxeComponentBase } from '../component'
|
3 | import { VxeTableDataRow } from '../table'
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export const VxeTableMenuModule: VXEComponent<{ [key: string]: any }>
|
11 |
|
12 |
|
13 |
|
14 | export const Menu: VXEComponent<{ [key: string]: any }>
|
15 |
|
16 | export type VxeTableMenuPanelInstance = ComponentPublicInstance<VxeTableMenuPanelProps, VxeTableMenuPanelConstructor>
|
17 |
|
18 | export interface VxeTableMenuPanelConstructor extends VxeComponentBase, VxeTableMenuPanelMethods {
|
19 | props: VxeTableMenuPanelProps
|
20 | context: SetupContext
|
21 | getRefMaps(): MenuPanelPrivateRef
|
22 | renderVN: RenderFunction
|
23 | }
|
24 |
|
25 | export interface MenuPanelPrivateRef {
|
26 | refElem: Ref<HTMLDivElement>
|
27 | }
|
28 | export interface VxeTableMenuPanelPrivateRef extends MenuPanelPrivateRef { }
|
29 |
|
30 | export interface VxeTableMenuPanelMethods { }
|
31 |
|
32 | export type VxeTableMenuPanelProps = {
|
33 | [key: string]: any
|
34 | }
|
35 |
|
36 | export interface TableMenuMethods<D = VxeTableDataRow> {
|
37 | |
38 |
|
39 |
|
40 | closeMenu(): Promise<any>
|
41 | }
|
42 |
|
43 | export interface TableMenuPrivateMethods<D = VxeTableDataRow> {
|
44 | moveCtxMenu(evnt: any, ctxMenuStore: any, property: any, hasOper: boolean, operRest: any, menuList: any): void
|
45 | handleOpenMenuEvent(evnt: Event, type: 'header' | 'body' | 'footer', params: any): void
|
46 | handleGlobalContextmenuEvent(evnt: any): void
|
47 | ctxMenuMouseoverEvent(evnt: any, item: any, child?: any): void
|
48 | ctxMenuMouseoutEvent(evnt: any, item: any): void
|
49 | ctxMenuLinkEvent(evnt: any, menu: any): void
|
50 | }
|
51 |
|
52 | declare module '../grid' {
|
53 | export interface VxeGridMethods<D = VxeTableDataRow> extends TableMenuMethods<D> { }
|
54 | }
|
55 |
|
56 | declare module '../table' {
|
57 | export interface VxeTableMethods<D = VxeTableDataRow> extends TableMenuMethods<D> { }
|
58 | export interface VxeTablePrivateMethods<D = VxeTableDataRow> extends TableMenuPrivateMethods<D> { }
|
59 | export namespace VxeTableDefines {
|
60 | export interface MenuOptions {
|
61 | disabled?: boolean
|
62 | options?: MenuFirstOption[][]
|
63 | }
|
64 | export interface MenuFirstOption {
|
65 | code?: string
|
66 | name?: string
|
67 | prefixIcon?: string
|
68 | suffixIcon?: string
|
69 | className?: string
|
70 | visible?: boolean
|
71 | disabled?: boolean
|
72 | children?: MenuChildOption[]
|
73 | params?: any
|
74 | [key: string]: any
|
75 | }
|
76 | export interface MenuChildOption {
|
77 | code?: string
|
78 | name?: string
|
79 | prefixIcon?: string
|
80 | className?: string
|
81 | visible?: boolean
|
82 | disabled?: boolean
|
83 | params?: any
|
84 | [key: string]: any
|
85 | }
|
86 | }
|
87 | }
|