vxe-pc-ui 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/es/drawer/index.js +0 -1
  2. package/es/form/src/form.js +5 -2
  3. package/es/form-design/widget-select/select-form.js +2 -3
  4. package/es/icon/style/iconfont.1716394371834.ttf +0 -0
  5. package/es/icon/style/iconfont.1716394371834.woff +0 -0
  6. package/es/icon/style/iconfont.1716394371834.woff2 +0 -0
  7. package/es/icon/style.css +1 -1
  8. package/es/iconfont.1716394371834.ttf +0 -0
  9. package/es/iconfont.1716394371834.woff +0 -0
  10. package/es/iconfont.1716394371834.woff2 +0 -0
  11. package/es/modal/index.js +0 -1
  12. package/es/print/src/util.js +9 -0
  13. package/es/style.css +1 -1
  14. package/es/style.min.css +1 -1
  15. package/es/ui/index.js +9 -1
  16. package/lib/drawer/index.js +1 -2
  17. package/lib/drawer/index.min.js +1 -1
  18. package/lib/form/src/form.js +5 -2
  19. package/lib/form/src/form.min.js +1 -1
  20. package/lib/form-design/widget-select/select-form.js +1 -2
  21. package/lib/form-design/widget-select/select-form.min.js +1 -1
  22. package/lib/icon/style/iconfont.1716394371834.ttf +0 -0
  23. package/lib/icon/style/iconfont.1716394371834.woff +0 -0
  24. package/lib/icon/style/iconfont.1716394371834.woff2 +0 -0
  25. package/lib/icon/style/style.css +1 -1
  26. package/lib/icon/style/style.min.css +1309 -1
  27. package/lib/iconfont.1716394371834.ttf +0 -0
  28. package/lib/iconfont.1716394371834.woff +0 -0
  29. package/lib/iconfont.1716394371834.woff2 +0 -0
  30. package/lib/index.umd.js +33 -22
  31. package/lib/index.umd.min.js +1 -1
  32. package/lib/modal/index.js +1 -2
  33. package/lib/modal/index.min.js +1 -1
  34. package/lib/print/src/util.js +9 -0
  35. package/lib/print/src/util.min.js +1 -1
  36. package/lib/style.css +1 -1
  37. package/lib/style.min.css +1 -1
  38. package/lib/ui/index.js +9 -1
  39. package/lib/ui/index.min.js +1 -1
  40. package/package.json +7 -5
  41. package/packages/components.ts +1 -3
  42. package/packages/drawer/index.ts +0 -2
  43. package/packages/form/src/form-config-item.ts +2 -2
  44. package/packages/form/src/form-gather.ts +1 -1
  45. package/packages/form/src/form-item.ts +2 -2
  46. package/packages/form/src/form.ts +5 -2
  47. package/packages/form-design/widget-select/select-form.ts +2 -3
  48. package/packages/input/src/input.ts +2 -2
  49. package/packages/modal/index.ts +0 -2
  50. package/packages/print/src/print.ts +1 -1
  51. package/packages/print/src/util.ts +9 -0
  52. package/packages/pulldown/src/pulldown.ts +2 -2
  53. package/packages/select/src/select.ts +2 -2
  54. package/packages/ui/index.ts +9 -1
  55. package/packages/ui/src/vn.ts +1 -2
  56. package/types/components/colgroup.d.ts +137 -0
  57. package/types/components/column.d.ts +621 -0
  58. package/types/components/form-item.d.ts +7 -3
  59. package/types/components/form.d.ts +2 -2
  60. package/types/components/grid.d.ts +633 -0
  61. package/types/components/option.d.ts +2 -2
  62. package/types/components/print.d.ts +19 -3
  63. package/types/components/table-module/custom.d.ts +32 -0
  64. package/types/components/table-module/edit.d.ts +166 -0
  65. package/types/components/table-module/export.d.ts +81 -0
  66. package/types/components/table-module/filter.d.ts +79 -0
  67. package/types/components/table-module/index.d.ts +7 -0
  68. package/types/components/table-module/keyboard.d.ts +22 -0
  69. package/types/components/table-module/menu.d.ts +54 -0
  70. package/types/components/table-module/validator.d.ts +104 -0
  71. package/types/components/table-plugins/extend-cell-area.d.ts +601 -0
  72. package/types/components/table-plugins/index.d.ts +1 -0
  73. package/types/components/table.d.ts +3714 -0
  74. package/types/components/toolbar.d.ts +291 -0
  75. package/types/components/tooltip.d.ts +1 -1
  76. package/types/ui/commands.d.ts +13 -0
  77. package/types/ui/formats.d.ts +11 -0
  78. package/types/ui/global-config.d.ts +43 -0
  79. package/types/ui/global-icon.d.ts +34 -0
  80. package/types/ui/hooks.d.ts +11 -0
  81. package/types/ui/index.d.ts +6 -8
  82. package/types/ui/interceptor.d.ts +47 -0
  83. package/types/ui/menus.d.ts +14 -0
  84. package/types/ui/renderer.d.ts +224 -8
  85. package/types/ui/validators.d.ts +5 -0
@@ -0,0 +1,291 @@
1
+ import { RenderFunction, SetupContext, Ref, ComponentPublicInstance, DefineComponent } from 'vue'
2
+ import { defineVxeComponent, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, ValueOf } from '@vxe-ui/core'
3
+ import { VxeButtonProps } from './button'
4
+ import { VxeTableDefines, VxeTableConstructor, VxeTablePrivateMethods } from './table'
5
+
6
+ /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
7
+
8
+ export declare const VxeToolbar: defineVxeComponent<VxeToolbarProps, VxeToolbarEventProps>
9
+ export type VxeToolbarComponent = DefineComponent<VxeToolbarProps, VxeToolbarEmits>
10
+
11
+ export type VxeToolbarInstance = ComponentPublicInstance<VxeToolbarProps, VxeToolbarConstructor>
12
+
13
+ export interface VxeToolbarConstructor extends VxeComponentBaseOptions, VxeToolbarMethods {
14
+ props: VxeToolbarProps
15
+ context: SetupContext<VxeToolbarEmits>
16
+ reactData: ToolbarReactData
17
+ getRefMaps(): ToolbarPrivateRef
18
+ getComputeMaps(): ToolbarPrivateComputed
19
+ renderVN: RenderFunction
20
+ }
21
+
22
+ export interface ToolbarPrivateRef {
23
+ refElem: Ref<HTMLDivElement | undefined>
24
+ }
25
+ export interface VxeToolbarPrivateRef extends ToolbarPrivateRef { }
26
+
27
+ export namespace VxeToolbarPropTypes {
28
+ export type Size = VxeComponentSizeType
29
+ export type Id = string
30
+ export type Loading = boolean
31
+
32
+ interface ResizableConfig {
33
+ storage?: boolean
34
+ }
35
+ export type Resizable = boolean | ResizableConfig
36
+ export interface ResizableOpts extends ResizableConfig { }
37
+
38
+ interface RefreshConfig {
39
+ queryMethod?(params: { [key: string]: any }): any
40
+ code?: 'query' | 'reload' | '' | null
41
+ icon?: string
42
+ iconLoading?: string
43
+ /**
44
+ * @deprecated 请使用 queryMethod
45
+ */
46
+ query?(params: { [key: string]: any }): Promise<any>
47
+ }
48
+ export type Refresh = boolean | RefreshConfig
49
+ export interface RefreshOpts extends RefreshConfig { }
50
+
51
+ interface ImportConfig {
52
+ icon?: string
53
+ }
54
+ export type Import = boolean | ImportConfig
55
+ export interface ImportOpts extends ImportConfig { }
56
+
57
+ interface ExportConfig {
58
+ icon?: string
59
+ }
60
+ export type Export = boolean | ExportConfig
61
+ export interface ExportOpts extends ExportConfig { }
62
+
63
+ export interface PrintConfig {
64
+ icon?: string
65
+ }
66
+ export type Print = boolean | PrintConfig
67
+ export interface PrintOpts extends PrintConfig { }
68
+
69
+ interface ZoomConfig {
70
+ iconIn?: string
71
+ iconOut?: string
72
+ }
73
+ export type Zoom = boolean | ZoomConfig
74
+ export interface ZoomOpts extends ZoomConfig { }
75
+
76
+ interface CustomConfig {
77
+ icon?: string
78
+
79
+ /**
80
+ * 已废弃,请使用 custom-config.trigger
81
+ * @deprecated
82
+ */
83
+ trigger?: string,
84
+ /**
85
+ * 已废弃,请使用 custom-config.immediate
86
+ * @deprecated
87
+ */
88
+ immediate?: boolean
89
+ /**
90
+ * 已废弃,请使用 custom-config.storage
91
+ * @deprecated
92
+ */
93
+ storage?: boolean
94
+ /**
95
+ * 已废弃,请使用 custom-config.checkMethod
96
+ * @deprecated
97
+ */
98
+ checkMethod?(params: { column: VxeTableDefines.ColumnInfo }): boolean
99
+ /**
100
+ * 已废弃,请使用 custom-config.showFooter
101
+ * @deprecated
102
+ */
103
+ showFooter?: boolean
104
+ /**
105
+ * 已废弃,请使用 custom-config.allowFixed
106
+ * @deprecated
107
+ */
108
+ allowFixed?: boolean
109
+ /**
110
+ * 已废弃,请使用 custom-config.resetButtonText
111
+ * @deprecated
112
+ */
113
+ resetButtonText?: string
114
+ /**
115
+ * 已废弃,请使用 custom-config.confirmButtonText
116
+ * @deprecated
117
+ */
118
+ confirmButtonText?: string
119
+ /**
120
+ * 已废弃,请使用 custom-config.showFooter
121
+ * @deprecated
122
+ */
123
+ isFooter?: boolean
124
+ }
125
+ export type Custom = boolean | CustomConfig
126
+ export interface CustomOpts extends CustomConfig { }
127
+
128
+ interface ButtonAndToolConfig extends VxeButtonProps {
129
+ code?: string
130
+ visible?: boolean
131
+ params?: any
132
+ }
133
+
134
+ export interface ButtonRender {
135
+ /**
136
+ * 渲染器名称
137
+ */
138
+ name?: string
139
+ /**
140
+ * 目标组件渲染的参数
141
+ */
142
+ props?: { [key: string]: any }
143
+ /**
144
+ * 目标组件渲染的属性
145
+ */
146
+ attrs?: { [key: string]: any }
147
+ /**
148
+ * 目标组件渲染的事件
149
+ */
150
+ events?: { [key: string]: (...args: any[]) => any }
151
+ }
152
+ export interface ButtonConfig extends ButtonAndToolConfig {
153
+ dropdowns?: ButtonConfig[]
154
+ buttonRender?: ButtonRender
155
+ }
156
+ export type Buttons = ButtonConfig[]
157
+
158
+ export interface ToolRender {
159
+ /**
160
+ * 渲染器名称
161
+ */
162
+ name?: string
163
+ /**
164
+ * 目标组件渲染的参数
165
+ */
166
+ props?: { [key: string]: any }
167
+ /**
168
+ * 目标组件渲染的属性
169
+ */
170
+ attrs?: { [key: string]: any }
171
+ /**
172
+ * 目标组件渲染的事件
173
+ */
174
+ events?: { [key: string]: (...args: any[]) => any }
175
+ }
176
+ export interface ToolConfig extends ButtonAndToolConfig {
177
+ dropdowns?: ToolConfig[]
178
+ toolRender?: ToolRender
179
+ }
180
+ export type Tools = ToolConfig[]
181
+
182
+ export type Perfect = boolean
183
+
184
+ export type ClassName = string | ((params: {
185
+ $toolbar: VxeToolbarConstructor
186
+ }) => string)
187
+ }
188
+
189
+ export type VxeToolbarProps = {
190
+ size?: VxeToolbarPropTypes.Size
191
+ /**
192
+ * 唯一 ID 标识
193
+ */
194
+ id?: VxeToolbarPropTypes.Id
195
+ /**
196
+ * 是否加载中
197
+ */
198
+ loading?: VxeToolbarPropTypes.Loading
199
+ /**
200
+ * 列宽拖动配置
201
+ */
202
+ resizable?: VxeToolbarPropTypes.Resizable
203
+ /**
204
+ * 刷新按钮配置
205
+ */
206
+ refresh?: VxeToolbarPropTypes.Refresh
207
+ /**
208
+ * 导入按钮配置
209
+ */
210
+ import?: VxeToolbarPropTypes.Import
211
+ /**
212
+ * 导出按钮配置
213
+ */
214
+ export?: VxeToolbarPropTypes.Export
215
+ print?: VxeToolbarPropTypes.Print
216
+ zoom?: VxeToolbarPropTypes.Zoom
217
+ /**
218
+ * 自定义列配置
219
+ */
220
+ custom?: VxeToolbarPropTypes.Custom
221
+ /**
222
+ * 按钮列表
223
+ */
224
+ buttons?: VxeToolbarPropTypes.Buttons
225
+ tools?: VxeToolbarPropTypes.Tools
226
+ /**
227
+ * 配套的样式
228
+ */
229
+ perfect?: VxeToolbarPropTypes.Perfect
230
+ className?: VxeToolbarPropTypes.ClassName
231
+ }
232
+
233
+ export interface ToolbarPrivateComputed {
234
+ }
235
+ export interface VxeToolbarPrivateComputed extends ToolbarPrivateComputed { }
236
+
237
+ export interface ToolbarReactData {
238
+ isRefresh: boolean
239
+ columns: VxeTableDefines.ColumnInfo[]
240
+ }
241
+
242
+ export interface ToolbarMethods {
243
+ dispatchEvent(type: ValueOf<VxeToolbarEmits>, params: Record<string, any>, evnt: Event | null): void
244
+ syncUpdate(params: {
245
+ collectColumn: VxeTableDefines.ColumnInfo<any>[]
246
+ $table: VxeTableConstructor<any> & VxeTablePrivateMethods<any>
247
+ }): void
248
+ }
249
+ export interface VxeToolbarMethods extends ToolbarMethods { }
250
+
251
+ export interface ToolbarPrivateMethods { }
252
+ export interface VxeToolbarPrivateMethods extends ToolbarPrivateMethods { }
253
+
254
+ export type VxeToolbarEmits = [
255
+ 'button-click',
256
+ 'tool-click'
257
+ ]
258
+
259
+ export namespace VxeToolbarDefines {
260
+ export interface ToolbarEventParams extends VxeComponentEventParams {
261
+ $toolbar: VxeToolbarConstructor
262
+ }
263
+ }
264
+
265
+ export type VxeToolbarEventProps = {}
266
+
267
+ export interface VxeToolbarListeners { }
268
+
269
+ export namespace VxeToolbarEvents { }
270
+
271
+ export namespace VxeToolbarSlotTypes {
272
+ export interface DefaultSlotParams {}
273
+ }
274
+
275
+ export interface VxeToolbarSlots {
276
+ /**
277
+ * 自定义左侧按钮列表
278
+ */
279
+ buttons: (params: {
280
+ [key: string]: any
281
+ }) => any
282
+ /**
283
+ * 自定义右侧工具列表
284
+ */
285
+ tools: ((params: {
286
+ [key: string]: any
287
+ }) => any) | undefined
288
+ }
289
+
290
+ export const Toolbar: typeof VxeToolbar
291
+ export default VxeToolbar
@@ -26,7 +26,7 @@ export namespace VxeTooltipPropTypes {
26
26
  export type Size = VxeComponentSizeType
27
27
  export type ModelValue = boolean
28
28
  export type Trigger = 'hover' | 'click' | 'manual' | '' | null
29
- export type Theme = string
29
+ export type Theme = '' | 'light' | 'dark'
30
30
  export type Content = string | number
31
31
  export type UseHTML = boolean
32
32
  export type ZIndex = string | number
@@ -0,0 +1,13 @@
1
+ import { VxeGridConstructor } from '../components/grid'
2
+ import { VxeToolbarPropTypes } from '../components/toolbar'
3
+ import { VxeTableConstructor } from '../components/table'
4
+
5
+ declare module '@vxe-ui/core' {
6
+ export namespace VxeGlobalCommandsHandles {
7
+ export interface CommandMethodParams {
8
+ $grid: VxeGridConstructor | null
9
+ $table: VxeTableConstructor
10
+ button?: VxeToolbarPropTypes.ButtonConfig | null
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,11 @@
1
+ import { VxeTableDefines } from '../components/table'
2
+
3
+ declare module '@vxe-ui/core' {
4
+ export namespace VxeGlobalFormatsHandles {
5
+ export interface FormatMethodParams {
6
+ cellValue: any
7
+ row: any
8
+ column: VxeTableDefines.ColumnInfo
9
+ }
10
+ }
11
+ }
@@ -7,11 +7,16 @@ import { VxeButtonGroupProps } from '../components/button-group'
7
7
  import { VxeCheckboxProps } from '../components/checkbox'
8
8
  import { VxeCheckboxGroupProps } from '../components/checkbox-group'
9
9
  import { VxeColProps } from '../components/col'
10
+ import { VxeColgroupProps } from '../components/colgroup'
11
+ import { VxeCollapseProps } from '../components/collapse'
12
+ import { VxeCollapsePaneProps } from '../components/collapse-pane'
13
+ import { VxeColumnProps } from '../components/column'
10
14
  import { VxeDrawerProps } from '../components/drawer'
11
15
  import { VxeFormProps } from '../components/form'
12
16
  import { VxeFormDesignProps } from '../components/form-design'
13
17
  import { VxeFormGatherProps } from '../components/form-gather'
14
18
  import { VxeFormItemProps } from '../components/form-item'
19
+ import { VxeGridProps } from '../components/grid'
15
20
  import { VxeIconProps } from '../components/icon'
16
21
  import { VxeInputProps } from '../components/input'
17
22
  import { VxeLayoutAsideProps } from '../components/layout-aside'
@@ -34,8 +39,10 @@ import { VxeRowProps } from '../components/row'
34
39
  import { VxeSelectProps } from '../components/select'
35
40
  import { VxeSwitchProps } from '../components/switch'
36
41
  import { VxeTabPaneProps } from '../components/tab-pane'
42
+ import { VxeTableProps } from '../components/table'
37
43
  import { VxeTabsProps } from '../components/tabs'
38
44
  import { VxeTextareaProps } from '../components/textarea'
45
+ import { VxeToolbarProps } from '../components/toolbar'
39
46
  import { VxeTooltipProps } from '../components/tooltip'
40
47
 
41
48
  declare module '@vxe-ui/core' {
@@ -49,11 +56,16 @@ declare module '@vxe-ui/core' {
49
56
  checkbox?: VxeCheckboxProps
50
57
  checkboxGroup?: VxeCheckboxGroupProps
51
58
  col?: VxeColProps
59
+ colgroup?: VxeColgroupProps
60
+ collapse?: VxeCollapseProps
61
+ collapsePane?: VxeCollapsePaneProps
62
+ column?: VxeColumnProps
52
63
  drawer?: VxeDrawerProps
53
64
  form?: VxeFormProps
54
65
  formDesign?: VxeFormDesignProps
55
66
  formGather?: VxeFormGatherProps
56
67
  formItem?: VxeFormItemProps
68
+ grid?: VxeGridProps
57
69
  icon?: VxeIconProps
58
70
  input?: VxeInputProps
59
71
  layoutAside?: VxeLayoutAsideProps
@@ -76,8 +88,39 @@ declare module '@vxe-ui/core' {
76
88
  select?: VxeSelectProps
77
89
  switch?: VxeSwitchProps
78
90
  tabPane?: VxeTabPaneProps
91
+ table?: VxeTableProps
79
92
  tabs?: VxeTabsProps
80
93
  textarea?: VxeTextareaProps
94
+ toolbar?: VxeToolbarProps
81
95
  tooltip?: VxeTooltipProps
96
+
97
+ /**
98
+ * 获取导出的所有文件类型
99
+ * @deprecated
100
+ */
101
+ exportTypes?: string[]
102
+ /**
103
+ * 获取导入的所有文件类型
104
+ * @deprecated
105
+ */
106
+ importTypes?: string[]
107
+ /**
108
+ * @deprecated
109
+ */
110
+ emptyCell?: string
111
+ /**
112
+ * @deprecated
113
+ */
114
+ translate?(key: string, args?: any): string
115
+ /**
116
+ * 还原成老的校验样式
117
+ * @deprecated
118
+ */
119
+ cellVaildMode?: 'obsolete'
120
+ /**
121
+ * 返回老的校验结果
122
+ * @deprecated
123
+ */
124
+ validToReject?: 'obsolete'
82
125
  }
83
126
  }
@@ -2,6 +2,40 @@ import '@vxe-ui/core'
2
2
 
3
3
  declare module '@vxe-ui/core' {
4
4
  export interface VxeGlobalIcon {
5
+ // table
6
+ TABLE_SORT_ASC?: string
7
+ TABLE_SORT_DESC?: string
8
+ TABLE_FILTER_NONE?: string
9
+ TABLE_FILTER_MATCH?: string
10
+ TABLE_EDIT?: string
11
+ TABLE_TITLE_PREFIX?: string
12
+ TABLE_TITLE_SUFFIX?: string
13
+ TABLE_TREE_LOADED?: string
14
+ TABLE_TREE_OPEN?: string
15
+ TABLE_TREE_CLOSE?: string
16
+ TABLE_EXPAND_LOADED?: string
17
+ TABLE_EXPAND_OPEN?: string
18
+ TABLE_EXPAND_CLOSE?: string
19
+ TABLE_CHECKBOX_CHECKED?: string
20
+ TABLE_CHECKBOX_UNCHECKED?: string
21
+ TABLE_CHECKBOX_INDETERMINATE?: string
22
+ TABLE_RADIO_CHECKED?: string
23
+ TABLE_RADIO_UNCHECKED?: string
24
+
25
+ // toolbar
26
+ TOOLBAR_TOOLS_REFRESH?: string
27
+ TOOLBAR_TOOLS_REFRESH_LOADING?: string
28
+ TOOLBAR_TOOLS_IMPORT?: string
29
+ TOOLBAR_TOOLS_EXPORT?: string
30
+ TOOLBAR_TOOLS_PRINT?: string
31
+ TOOLBAR_TOOLS_FULLSCREEN?: string
32
+ TOOLBAR_TOOLS_MINIMIZE?: string
33
+ TOOLBAR_TOOLS_CUSTOM?: string
34
+ TOOLBAR_TOOLS_FIXED_LEFT?: string
35
+ TOOLBAR_TOOLS_FIXED_LEFT_ACTIVED?: string
36
+ TOOLBAR_TOOLS_FIXED_RIGHT?: string
37
+ TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVED?: string
38
+
5
39
  // loading
6
40
  LOADING?: string
7
41
 
@@ -0,0 +1,11 @@
1
+ import { VxeTableConstructor, VxeTableMethods, VxeTablePrivateMethods } from '../components/table'
2
+ import { VxeGridConstructor, VxeGridPrivateMethods } from '../components/grid'
3
+
4
+ declare module '@vxe-ui/core' {
5
+ export namespace VxeGlobalHooksHandles {
6
+ export interface HookOptions {
7
+ setupTable?($table: VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods<any>): void | Record<string, any>
8
+ setupGrid?($grid: VxeGridConstructor & VxeGridPrivateMethods): void | Record<string, any>
9
+ }
10
+ }
11
+ }
@@ -4,17 +4,10 @@ import { DrawerController } from '../components/drawer'
4
4
  import { VxePrintDefines } from '../components/print'
5
5
  import { VxeUploadDefines } from '../components/upload'
6
6
 
7
- export const uiVersion: string
8
- export const modal: ModalController
9
- export const drawer: DrawerController
10
- export const dynamicApp: App<Element>
11
- export const print: VxePrintDefines.PrintFunction
12
- export const saveFile: VxeUploadDefines.SaveFileFunction
13
- export const readFile: VxeUploadDefines.ReadFileFunction
14
-
15
7
  declare module '@vxe-ui/core' {
16
8
  export interface VxeUIExport {
17
9
  uiVersion: string
10
+ tableVersion: string
18
11
  modal: ModalController
19
12
  drawer: DrawerController
20
13
  dynamicApp: App<Element>
@@ -27,7 +20,12 @@ declare module '@vxe-ui/core' {
27
20
  export * from './global-config'
28
21
  export * from './global-icon'
29
22
  export * from './renderer'
23
+ export * from './interceptor'
24
+ export * from './commands'
25
+ export * from './formats'
26
+ export * from './menus'
30
27
  export * from './validators'
28
+ export * from './hooks'
31
29
 
32
30
  export * from '@vxe-ui/core'
33
31
  export default VxeUI
@@ -0,0 +1,47 @@
1
+ import { VxeTableConstructor, VxeTableDefines, VxeTablePropTypes, VxeTablePrivateMethods } from '../components/table'
2
+ import { VxeGridConstructor, VxeGridPrivateMethods } from '../components/grid'
3
+
4
+ declare module '@vxe-ui/core' {
5
+ export namespace VxeGlobalInterceptorHandles {
6
+ export type HookType = 'created' | 'mounted' | 'activated' | 'beforeUnmount' | 'unmounted'
7
+ export type EventType = 'event.clearEdit' | 'event.clearActived' | 'event.clearFilter' | 'event.clearAreas' | 'event.showMenu' | 'event.keydown' | 'event.export' | 'event.import'
8
+ export type Type = HookType | EventType
9
+
10
+ export type InterceptorCallback = (params: any) => any
11
+
12
+ interface InterceptorParams {
13
+ $grid?: VxeGridConstructor<any> & VxeGridPrivateMethods<any>
14
+ $table: VxeTableConstructor<any> & VxeTablePrivateMethods<any>
15
+ $event: Event
16
+ }
17
+
18
+ export interface InterceptorKeydownParams extends InterceptorParams { }
19
+ export interface InterceptorClearFilterParams extends InterceptorParams { }
20
+ export interface InterceptorClearEditParams extends InterceptorParams { }
21
+ export interface InterceptorClearAreasParams extends InterceptorParams { }
22
+
23
+ export interface InterceptorExportParams extends InterceptorParams {
24
+ options: VxeTablePropTypes.ExportHandleOptions
25
+ columns: VxeTableDefines.ColumnInfo<any>[]
26
+ colgroups: VxeTableDefines.ColumnInfo<any>[][]
27
+ datas: any[]
28
+ }
29
+
30
+ export interface InterceptorImportParams extends InterceptorParams {
31
+ file: File
32
+ options: VxeTablePropTypes.ExportHandleOptions
33
+ columns: VxeTableDefines.ColumnInfo<any>[]
34
+ datas: any[]
35
+ }
36
+
37
+ export interface InterceptorShowMenuParams extends InterceptorParams {
38
+ type: 'header' | 'body' | 'footer'
39
+ options: VxeTableDefines.MenuFirstOption[][]
40
+ columns: VxeTableDefines.ColumnInfo<any>[]
41
+ row?: any
42
+ rowIndex?: number
43
+ column?: VxeTableDefines.ColumnInfo<any>
44
+ columnIndex?: number
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,14 @@
1
+ import { VxeTableConstructor, VxeTableDefines, VxeTablePrivateMethods } from '../components/table'
2
+ import { VxeGridConstructor } from '../components/grid'
3
+ import { VxeGlobalRendererHandles } from './renderer'
4
+
5
+ declare module '@vxe-ui/core' {
6
+ export namespace VxeGlobalMenusHandles {
7
+ export interface MenuMethodParams extends VxeGlobalRendererHandles.RenderCellParams {
8
+ $grid: VxeGridConstructor | null
9
+ $table: VxeTableConstructor & VxeTablePrivateMethods
10
+ $event: MouseEvent
11
+ menu: VxeTableDefines.MenuFirstOption | VxeTableDefines.MenuChildOption
12
+ }
13
+ }
14
+ }