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,633 @@
1
+ import { RenderFunction, SetupContext, Ref, ComponentPublicInstance, DefineComponent, ComputedRef } from 'vue'
2
+ import { defineVxeComponent, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, VxeComponentSlotType, ValueOf } from '@vxe-ui/core'
3
+ import { VxeToolbarInstance, VxeToolbarProps, VxeToolbarPropTypes } from './toolbar'
4
+ import { VxeTableDefines, VxeTableEmits, VxeTableConstructor, VxeTableProps, TableMethods, VxeTableMethods, VxeTablePrivateMethods } from './table'
5
+ import { VxePagerInstance, VxePagerProps, VxePagerDefines } from './pager'
6
+ import { VxeFormInstance, VxeFormProps, VxeFormDefines } from './form'
7
+ import { VxeFormItemProps } from './form-item'
8
+
9
+ /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
10
+
11
+ export declare const VxeGrid: defineVxeComponent<VxeGridProps, VxeGridEventProps>
12
+ export type VxeGridComponent = DefineComponent<VxeGridProps, VxeGridEmits>
13
+
14
+ export type VxeGridInstance = ComponentPublicInstance<VxeGridProps, VxeGridConstructor>
15
+
16
+ export interface VxeGridConstructor<D = any> extends VxeComponentBaseOptions, VxeGridMethods<D> {
17
+ props: VxeGridProps
18
+ context: SetupContext<VxeGridEmits>
19
+ reactData: GridReactData
20
+ getRefMaps(): GridPrivateRef
21
+ getComputeMaps(): GridPrivateComputed
22
+ renderVN: RenderFunction
23
+ }
24
+
25
+ export interface GridPrivateRef<D = any> {
26
+ refElem: Ref<HTMLDivElement | undefined>
27
+ refTable: Ref<ComponentPublicInstance<VxeTableProps<D>, VxeTableConstructor<D> & VxeTableMethods<D> & VxeTablePrivateMethods<D>>>
28
+ refForm: Ref<VxeFormInstance>
29
+ refToolbar: Ref<VxeToolbarInstance>
30
+ refPager: Ref<VxePagerInstance>
31
+ }
32
+ export interface VxeGridPrivateRef<D = any> extends GridPrivateRef<D> { }
33
+
34
+ export namespace VxeGridPropTypes {
35
+ export type Size = VxeComponentSizeType
36
+
37
+ export type Layouts = ('Form' | 'Toolbar' | 'Top' | 'Table' | 'Bottom' | 'Pager')[]
38
+
39
+ export type Columns<D = any> = VxeTableDefines.ColumnOptions<D>[]
40
+
41
+ export interface PagerConfig extends VxePagerProps {
42
+ enabled?: boolean
43
+ slots?: any
44
+ }
45
+ export interface PagerOpts extends PagerConfig { }
46
+
47
+ interface ProxyAjaxQueryPageParams {
48
+ total: number
49
+ pageSize: number
50
+ currentPage: number
51
+ }
52
+
53
+ interface ProxyAjaxQuerySortCheckedParams<D = any> {
54
+ column: VxeTableDefines.ColumnInfo<D>
55
+ order: string
56
+ sortBy: string
57
+ field: string
58
+ property: string
59
+ }
60
+
61
+ interface ProxyAjaxQueryParams<D = any> {
62
+ $grid: VxeGridConstructor<D>
63
+ page: ProxyAjaxQueryPageParams
64
+ sort: ProxyAjaxQuerySortCheckedParams<D>
65
+ sorts: ProxyAjaxQuerySortCheckedParams<D>[]
66
+ filters: VxeTableDefines.FilterCheckedParams[]
67
+ form: {
68
+ [key: string]: any
69
+ }
70
+ }
71
+
72
+ interface ProxyAjaxQueryAllParams<D = any> {
73
+ $table: VxeTableConstructor<D>
74
+ $grid: VxeGridConstructor<D>
75
+ sort: ProxyAjaxQuerySortCheckedParams<D>
76
+ sorts: ProxyAjaxQuerySortCheckedParams<D>[]
77
+ filters: VxeTableDefines.FilterCheckedParams[]
78
+ form: {
79
+ [key: string]: any
80
+ }
81
+ options: any
82
+ }
83
+
84
+ interface ProxyAjaxDeleteParams<D = any> {
85
+ $grid: VxeGridConstructor<D>
86
+ body: {
87
+ removeRecords: D[]
88
+ }
89
+ }
90
+
91
+ interface ProxyAjaxSaveParams<D = any> {
92
+ $grid: VxeGridConstructor<D>
93
+ body: {
94
+ insertRecords: D[]
95
+ updateRecords: D[]
96
+ removeRecords: D[]
97
+ pendingRecords: D[]
98
+ }
99
+ }
100
+
101
+ export interface ProxyConfig<D = any> {
102
+ enabled?: boolean
103
+ autoLoad?: boolean
104
+ message?: boolean
105
+ seq?: boolean
106
+ sort?: boolean
107
+ filter?: boolean
108
+ form?: boolean
109
+ response?: {
110
+ list?: string | null | ((params: {
111
+ data: any
112
+ $grid: VxeGridConstructor<D>
113
+ }) => any[])
114
+ result?: string | ((params: {
115
+ data: any
116
+ $grid: VxeGridConstructor<D>
117
+ }) => any[])
118
+ total?: string | ((params: {
119
+ data: any
120
+ $grid: VxeGridConstructor<D>
121
+ }) => number)
122
+ message?: string | ((params: {
123
+ data: any
124
+ $grid: VxeGridConstructor<D>
125
+ }) => string)
126
+ }
127
+ ajax?: {
128
+ query?(params: ProxyAjaxQueryParams<D>, ...args: any[]): Promise<any>
129
+ queryAll?(params: ProxyAjaxQueryAllParams<D>, ...args: any[]): Promise<any>
130
+ delete?(params: ProxyAjaxDeleteParams<D>, ...args: any[]): Promise<any>
131
+ save?(params: ProxyAjaxSaveParams<D>, ...args: any[]): Promise<any>
132
+ }
133
+ [key: string]: any
134
+
135
+ /**
136
+ * 已废弃,请使用 proxy-config.response
137
+ * @deprecated
138
+ */
139
+ props?: {
140
+ /**
141
+ * 已废弃,请使用 proxy-config.response.list
142
+ * @deprecated
143
+ */
144
+ list?: string | null
145
+ /**
146
+ * 已废弃,请使用 proxy-config.response.result
147
+ * @deprecated
148
+ */
149
+ result?: string
150
+ /**
151
+ * 已废弃,请使用 proxy-config.response.total
152
+ * @deprecated
153
+ */
154
+ total?: string
155
+ /**
156
+ * 已废弃,请使用 proxy-config.response.message
157
+ * @deprecated
158
+ */
159
+ message?: string
160
+ }
161
+ }
162
+ export interface ProxyOpts<D = any> extends ProxyConfig<D> { }
163
+
164
+ export interface ToolbarOpts extends ToolbarConfig { }
165
+ export interface ToolbarConfig extends VxeToolbarProps {
166
+ enabled?: boolean
167
+ zoom?: boolean | {
168
+ escRestore?: boolean
169
+ iconIn?: string
170
+ iconOut?: string
171
+ }
172
+ slots?: {
173
+ buttons?: string | ((params: { [key: string]: any }) => VxeComponentSlotType | VxeComponentSlotType[])
174
+ tools?: string | ((params: { [key: string]: any }) => VxeComponentSlotType | VxeComponentSlotType[])
175
+ }
176
+ }
177
+
178
+ export interface FormConfig extends VxeFormProps {
179
+ enabled?: boolean
180
+ items?: VxeFormItemProps[]
181
+ }
182
+ export interface FormOpts extends FormConfig {
183
+ inited?: boolean
184
+ }
185
+
186
+ export interface ZoomConfig {
187
+ escRestore?: boolean
188
+ }
189
+ export interface ZoomOpts extends ZoomConfig { }
190
+ }
191
+
192
+ export type VxeGridProps<D = any> = VxeTableProps<D> & {
193
+ layouts?: VxeGridPropTypes.Layouts
194
+ columns?: VxeGridPropTypes.Columns<D>
195
+ pagerConfig?: VxeGridPropTypes.PagerConfig
196
+ proxyConfig?: VxeGridPropTypes.ProxyConfig<D>
197
+ toolbarConfig?: VxeGridPropTypes.ToolbarConfig
198
+ formConfig?: VxeGridPropTypes.FormConfig
199
+ zoomConfig?: VxeGridPropTypes.ZoomConfig
200
+ }
201
+
202
+ export interface GridPrivateComputed {
203
+ computeProxyOpts: ComputedRef<VxeGridPropTypes.ProxyOpts>
204
+ computePagerOpts: ComputedRef<VxeGridPropTypes.PagerOpts>
205
+ computeFormOpts: ComputedRef<VxeGridPropTypes.FormOpts>
206
+ computeToolbarOpts: ComputedRef<VxeGridPropTypes.ToolbarOpts>
207
+ computeZoomOpts: ComputedRef<VxeGridPropTypes.ZoomOpts>
208
+ }
209
+ export interface VxeGridPrivateComputed extends GridPrivateComputed { }
210
+
211
+ export interface GridReactData<D = any> {
212
+ tableLoading: boolean
213
+ proxyInited: boolean
214
+ isZMax: boolean
215
+ tableData: D[]
216
+ filterData: VxeTableDefines.FilterCheckedParams<D>[]
217
+ formData: any
218
+ sortData: VxeTableDefines.SortCheckedParams<D>[]
219
+ tZindex: number
220
+ tablePage: {
221
+ total: number
222
+ pageSize: number
223
+ currentPage: number
224
+ }
225
+ }
226
+
227
+ export interface GridMethods<D = any> {
228
+ dispatchEvent(type: ValueOf<VxeGridEmits>, params: Record<string, any>, evnt: Event | null): void
229
+ /**
230
+ * 给数据代理提交指令
231
+ * @param code 指令编码
232
+ */
233
+ commitProxy(code: string | VxeToolbarPropTypes.ButtonConfig, ...args: any[]): Promise<any>
234
+ /**
235
+ * 获取表单项列表
236
+ */
237
+ getFormItems(): VxeFormItemProps[]
238
+ getFormItems(itemIndex?: number): VxeFormItemProps
239
+ /**
240
+ * 切换表格最大化/还原
241
+ */
242
+ zoom(): Promise<boolean>
243
+ /**
244
+ * 判断是否最大化显示
245
+ */
246
+ isMaximized(): boolean
247
+ /**
248
+ * 如果表格处于常规状态,则最大化表格
249
+ */
250
+ maximize(): Promise<any>
251
+ /**
252
+ * 如果表格处于最大化状态,则还原表格
253
+ */
254
+ revert(): Promise<any>
255
+ /**
256
+ * 获取数据代理信息
257
+ */
258
+ getProxyInfo(): {
259
+ data: D[]
260
+ filter: any
261
+ form: any
262
+ sort: VxeTableDefines.SortCheckedParams<D> | { [key: string]: any }
263
+ sorts: VxeTableDefines.SortCheckedParams<D>[]
264
+ pager: {
265
+ total: number
266
+ pageSize: number
267
+ currentPage: number
268
+ }
269
+ pendingRecords: D[]
270
+ } | null
271
+ /**
272
+ * 设置数据代理信息
273
+ */
274
+ // setProxyInfo(options: {
275
+ // /**
276
+ // * 修改表格数据
277
+ // */
278
+ // data?: any[]
279
+ // /**
280
+ // * 修改表单数据
281
+ // */
282
+ // form?: {
283
+ // [key: string]: any
284
+ // },
285
+ // /**
286
+ // * 修改分页数据
287
+ // */
288
+ // pager?: {
289
+ // pageSize?: number
290
+ // currentPage?: number
291
+ // }
292
+ // }): Promise<any>
293
+ }
294
+ export interface VxeGridMethods<D = any> extends GridMethods<D>, TableMethods<D> { }
295
+
296
+ export interface GridPrivateMethods {
297
+ callSlot<T = any>(slotFunc: ((params: T) => VxeComponentSlotType | VxeComponentSlotType[]) | string | null, params: T): VxeComponentSlotType[]
298
+ extendTableMethods<T>(methodKeys: T[]): any
299
+ triggerToolbarCommitEvent(params: VxeToolbarPropTypes.ButtonConfig | VxeToolbarPropTypes.ToolConfig, evnt: Event): Promise<any>
300
+ triggerToolbarBtnEvent(button: VxeToolbarPropTypes.ButtonConfig, evnt: Event): void
301
+ triggerToolbarTolEvent(button: VxeToolbarPropTypes.ToolConfig, evnt: Event): void
302
+ triggerZoomEvent(evnt: Event): void
303
+ getParentHeight(): number
304
+ getExcludeHeight(): number
305
+ }
306
+ export interface VxeGridPrivateMethods extends GridPrivateMethods { }
307
+
308
+ export type VxeGridEmits = [
309
+ ...VxeTableEmits,
310
+
311
+ 'page-change',
312
+ 'form-submit',
313
+ 'form-submit-invalid',
314
+ 'form-reset',
315
+ 'form-collapse',
316
+ 'form-toggle-collapse',
317
+ 'proxy-query',
318
+ 'proxy-delete',
319
+ 'proxy-save',
320
+ 'toolbar-button-click',
321
+ 'toolbar-tool-click',
322
+ 'zoom'
323
+ ]
324
+
325
+ export namespace VxeGridDefines {
326
+ export interface GridEventParams<D = any> extends VxeComponentEventParams {
327
+ $grid: VxeGridConstructor<D>
328
+ }
329
+
330
+ export interface KeydownEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.KeydownEventParams<D> { }
331
+ export interface PasteEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.PasteEventParams<D> { }
332
+ export interface CopyEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.CopyEventParams<D> { }
333
+ export interface CutEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.CutEventParams<D> { }
334
+ export interface CurrentChangeEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.CurrentChangeEventParams<D> { }
335
+ export interface RadioChangeEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.RadioChangeEventParams<D> { }
336
+ export interface CheckboxChangeEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.CheckboxChangeEventParams<D> { }
337
+ export interface CheckboxAllEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.CheckboxAllEventParams<D> { }
338
+ export interface CheckboxRangeStartEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.CheckboxRangeStartEventParams<D> { }
339
+ export interface CheckboxRangeChangeEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.CheckboxRangeChangeEventParams<D> { }
340
+ export interface CheckboxRangeEndEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.CheckboxRangeEndEventParams<D> { }
341
+ export interface CellClickEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.CellClickEventParams<D> { }
342
+ export interface CellDblclickEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.CellDblclickEventParams<D> { }
343
+ export interface CellMenuEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.CellMenuEventParams<D> { }
344
+ export interface CellMouseenterEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.CellMouseenterEventParams<D> { }
345
+ export interface CellMouseleaveEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.CellMouseleaveEventParams<D> { }
346
+ export interface HeaderCellClickEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.HeaderCellClickEventParams<D> { }
347
+ export interface HeaderCellDblclickEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.HeaderCellDblclickEventParams<D> { }
348
+ export interface HeaderCellMenuEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.HeaderCellMenuEventParams<D> { }
349
+ export interface FooterCellClickEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.FooterCellClickEventParams<D> { }
350
+ export interface FooterCellDblclickEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.FooterCellDblclickEventParams<D> { }
351
+ export interface FooterCellMenuEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.FooterCellMenuEventParams<D> { }
352
+ export interface SortChangeEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.SortChangeEventParams<D> { }
353
+ export interface FilterChangeEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.FilterChangeEventParams<D> { }
354
+ export interface FilterVisibleEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.FilterVisibleEventParams<D> { }
355
+ export interface ResizableChangeEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.ResizableChangeEventParams<D> { }
356
+ export interface ToggleRowExpandEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.ToggleRowExpandEventParams<D> { }
357
+ export interface ToggleTreeExpandEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.ToggleTreeExpandEventParams<D> { }
358
+ export interface MenuClickEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.MenuClickEventParams<D> { }
359
+ export interface EditClosedEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.EditClosedEventParams<D> { }
360
+ export interface EditActivedEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.EditActivedEventParams<D> { }
361
+ export interface EditDisabledEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.EditDisabledEventParams<D> { }
362
+ export interface ValidErrorEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.ValidErrorEventParams<D> { }
363
+ export interface ScrollEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.ScrollEventParams<D> { }
364
+ export interface CustomEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.CustomEventParams<D> { }
365
+
366
+ export interface ProxyQueryEventParams<D = any> extends GridEventParams<D> {
367
+ status: boolean
368
+ isReload: boolean
369
+ isInited: boolean
370
+ }
371
+ export interface ProxyDeleteEventParams<D = any> extends GridEventParams<D> {
372
+ status: boolean
373
+ }
374
+ export interface ProxySaveEventParams<D = any> extends GridEventParams<D> {
375
+ status: boolean
376
+ }
377
+ export interface PageChangeEventParams<D = any> extends GridEventParams<D>, VxePagerDefines.PageChangeEventParams { }
378
+ export interface FormSubmitEventParams<D = any> extends GridEventParams<D>, VxeFormDefines.SubmitEventParams { }
379
+ export interface FormSubmitInvalidEventParams<D = any> extends GridEventParams<D>, VxeFormDefines.SubmitInvalidParams { }
380
+ export interface FormResetEventParams<D = any> extends GridEventParams<D>, VxeFormDefines.ResetEventParams { }
381
+ export interface FormCollapseEventParams<D = any> extends GridEventParams<D>, VxeFormDefines.CollapseEventParams { }
382
+
383
+ export interface ToolbarButtonClickParams {
384
+ code: string
385
+ button: VxeToolbarPropTypes.ButtonConfig
386
+ }
387
+ export interface ToolbarButtonClickEventParams<D = any> extends GridEventParams<D>, ToolbarButtonClickParams { }
388
+
389
+ export interface ToolbarToolClickParams {
390
+ code: string
391
+ tool: VxeToolbarPropTypes.ToolConfig
392
+ }
393
+ export interface ToolbarToolClickEventParams<D = any> extends GridEventParams<D>, ToolbarToolClickParams { }
394
+
395
+ export interface ZoomParams {
396
+ type: 'max' | 'revert'
397
+ }
398
+ export interface ZoomEventParams<D = any> extends GridEventParams<D>, ZoomParams { }
399
+ }
400
+
401
+ export interface VxeGridEventProps<D = any> {
402
+ onKeydown?: VxeGridEvents.Keydown<D>
403
+ onPaste?: VxeGridEvents.Paste<D>
404
+ onCopy?: VxeGridEvents.Copy<D>
405
+ onCut?: VxeGridEvents.Cut<D>
406
+ onCurrentChange?: VxeGridEvents.CurrentChange<D>
407
+ onRadioChange?: VxeGridEvents.RadioChange<D>
408
+ onCheckboxChange?: VxeGridEvents.CheckboxChange<D>
409
+ onCheckboxAll?: VxeGridEvents.CheckboxAll<D>
410
+ onCheckboxRangeStart?: VxeGridEvents.CheckboxRangeStart<D>
411
+ onCheckboxRangeChange?: VxeGridEvents.CheckboxRangeChange<D>
412
+ onCheckboxRangeEnd?: VxeGridEvents.CheckboxRangeEnd<D>
413
+ onCellClick?: VxeGridEvents.CellClick<D>
414
+ onCellDblclick?: VxeGridEvents.CellDblclick<D>
415
+ onCellMenu?: VxeGridEvents.CellMenu<D>
416
+ onCellMouseenter?: VxeGridEvents.CellMouseenter<D>
417
+ onCellMouseleave?: VxeGridEvents.CellMouseleave<D>
418
+ onHeaderCellClick?: VxeGridEvents.HeaderCellClick<D>
419
+ onHeaderCellDblclick?: VxeGridEvents.HeaderCellDblclick<D>
420
+ onHeaderCellMenu?: VxeGridEvents.HeaderCellMenu<D>
421
+ onFooterCellClick?: VxeGridEvents.FooterCellClick<D>
422
+ onFooterCellDblclick?: VxeGridEvents.FooterCellDblclick<D>
423
+ onFooterCellMenu?: VxeGridEvents.FooterCellMenu<D>
424
+ onSortChange?: VxeGridEvents.SortChange<D>
425
+ onFilterChange?: VxeGridEvents.FilterChange<D>
426
+ onFilterVisible?: VxeGridEvents.FilterVisible<D>
427
+ onResizableChange?: VxeGridEvents.ResizableChange<D>
428
+ onToggleRowExpand?: VxeGridEvents.ToggleRowExpand<D>
429
+ onToggleTreeExpand?: VxeGridEvents.ToggleTreeExpand<D>
430
+ onMenuClick?: VxeGridEvents.MenuClick<D>
431
+ onEditClosed?: VxeGridEvents.EditClosed<D>
432
+ onEditActived?: VxeGridEvents.EditActived<D>
433
+ onEditDisabled?: VxeGridEvents.EditDisabled<D>
434
+ onValidError?: VxeGridEvents.ValidError<D>
435
+ onScroll?: VxeGridEvents.Scroll<D>
436
+ onCustom?: VxeGridEvents.Custom<D>
437
+
438
+ // grid
439
+ onProxyQuery?: VxeGridEvents.ProxyQuery<D>
440
+ onProxyDelete?: VxeGridEvents.ProxyDelete<D>
441
+ onProxySave?: VxeGridEvents.ProxySave<D>
442
+ onPageChange?: VxeGridEvents.PageChange<D>
443
+ onFormSubmit?: VxeGridEvents.FormSubmit<D>
444
+ onFormSubmitInvalid?: VxeGridEvents.FormSubmitInvalid<D>
445
+ onFormReset?: VxeGridEvents.FormReset<D>
446
+ onFormCollapse?: VxeGridEvents.FormCollapse<D>
447
+ onToolbarButtonClick?: VxeGridEvents.ToolbarButtonClick<D>
448
+ onToolbarToolClick?: VxeGridEvents.ToolbarToolClick<D>
449
+ onZoom?: VxeGridEvents.Zoom<D>
450
+ }
451
+
452
+ export interface VxeGridListeners<D = any> {
453
+ keydown?: VxeGridEvents.Keydown<D>
454
+ paste?: VxeGridEvents.Paste<D>
455
+ copy?: VxeGridEvents.Copy<D>
456
+ cut?: VxeGridEvents.Cut<D>
457
+ currentChange?: VxeGridEvents.CurrentChange<D>
458
+ radioChange?: VxeGridEvents.RadioChange<D>
459
+ checkboxChange?: VxeGridEvents.CheckboxChange<D>
460
+ checkboxAll?: VxeGridEvents.CheckboxAll<D>
461
+ checkboxRangeStart?: VxeGridEvents.CheckboxRangeStart<D>
462
+ checkboxRangeChange?: VxeGridEvents.CheckboxRangeChange<D>
463
+ checkboxRangeEnd?: VxeGridEvents.CheckboxRangeEnd<D>
464
+ cellClick?: VxeGridEvents.CellClick<D>
465
+ cellDblclick?: VxeGridEvents.CellDblclick<D>
466
+ cellMenu?: VxeGridEvents.CellMenu<D>
467
+ cellMouseenter?: VxeGridEvents.CellMouseenter<D>
468
+ cellMouseleave?: VxeGridEvents.CellMouseleave<D>
469
+ headerCellClick?: VxeGridEvents.HeaderCellClick<D>
470
+ headerCellDblclick?: VxeGridEvents.HeaderCellDblclick<D>
471
+ headerCellMenu?: VxeGridEvents.HeaderCellMenu<D>
472
+ footerCellClick?: VxeGridEvents.FooterCellClick<D>
473
+ footerCellDblclick?: VxeGridEvents.FooterCellDblclick<D>
474
+ footerCellMenu?: VxeGridEvents.FooterCellMenu<D>
475
+ sortChange?: VxeGridEvents.SortChange<D>
476
+ filterChange?: VxeGridEvents.FilterChange<D>
477
+ filterVisible?: VxeGridEvents.FilterVisible<D>
478
+ resizableChange?: VxeGridEvents.ResizableChange<D>
479
+ toggleRowExpand?: VxeGridEvents.ToggleRowExpand<D>
480
+ toggleTreeExpand?: VxeGridEvents.ToggleTreeExpand<D>
481
+ menuClick?: VxeGridEvents.MenuClick<D>
482
+ editClosed?: VxeGridEvents.EditClosed<D>
483
+ editActived?: VxeGridEvents.EditActived<D>
484
+ editDisabled?: VxeGridEvents.EditDisabled<D>
485
+ validError?: VxeGridEvents.ValidError<D>
486
+ scroll?: VxeGridEvents.Scroll<D>
487
+ custom?: VxeGridEvents.Custom<D>
488
+
489
+ // grid
490
+ proxyQuery?: VxeGridEvents.ProxyQuery<D>
491
+ proxyDelete?: VxeGridEvents.ProxyDelete<D>
492
+ proxySave?: VxeGridEvents.ProxySave<D>
493
+ pageChange?: VxeGridEvents.PageChange<D>
494
+ formSubmit?: VxeGridEvents.FormSubmit<D>
495
+ formSubmitInvalid?: VxeGridEvents.FormSubmitInvalid<D>
496
+ formReset?: VxeGridEvents.FormReset<D>
497
+ formCollapse?: VxeGridEvents.FormCollapse<D>
498
+ toolbarButtonClick?: VxeGridEvents.ToolbarButtonClick<D>
499
+ toolbarToolClick?: VxeGridEvents.ToolbarToolClick<D>
500
+ zoom?: VxeGridEvents.Zoom<D>
501
+ }
502
+
503
+ export namespace VxeGridEvents {
504
+ export type Keydown<D = any> = (params: VxeGridDefines.KeydownEventParams<D>) => void
505
+ export type Paste<D = any> = (params: VxeGridDefines.PasteEventParams<D>) => void
506
+ export type Copy<D = any> = (params: VxeGridDefines.CopyEventParams<D>) => void
507
+ export type Cut<D = any> = (params: VxeGridDefines.CutEventParams<D>) => void
508
+ export type CurrentChange<D = any> = (params: VxeGridDefines.CurrentChangeEventParams<D>) => void
509
+ export type RadioChange<D = any> = (params: VxeGridDefines.RadioChangeEventParams<D>) => void
510
+ export type CheckboxChange<D = any> = (params: VxeGridDefines.CheckboxChangeEventParams<D>) => void
511
+ export type CheckboxAll<D = any> = (params: VxeGridDefines.CheckboxAllEventParams<D>) => void
512
+ export type CheckboxRangeStart<D = any> = (params: VxeGridDefines.CheckboxRangeStartEventParams<D>) => void
513
+ export type CheckboxRangeChange<D = any> = (params: VxeGridDefines.CheckboxRangeChangeEventParams<D>) => void
514
+ export type CheckboxRangeEnd<D = any> = (params: VxeGridDefines.CheckboxRangeEndEventParams<D>) => void
515
+ export type CellClick<D = any> = (params: VxeGridDefines.CellClickEventParams<D>) => void
516
+ export type CellDblclick<D = any> = (params: VxeGridDefines.CellDblclickEventParams<D>) => void
517
+ export type CellMenu<D = any> = (params: VxeGridDefines.CellMenuEventParams<D>) => void
518
+ export type CellMouseenter<D = any> = (params: VxeGridDefines.CellMouseenterEventParams<D>) => void
519
+ export type CellMouseleave<D = any> = (params: VxeGridDefines.CellMouseleaveEventParams<D>) => void
520
+ export type HeaderCellClick<D = any> = (params: VxeGridDefines.HeaderCellClickEventParams<D>) => void
521
+ export type HeaderCellDblclick<D = any> = (params: VxeGridDefines.HeaderCellDblclickEventParams<D>) => void
522
+ export type HeaderCellMenu<D = any> = (params: VxeGridDefines.HeaderCellMenuEventParams<D>) => void
523
+ export type FooterCellClick<D = any> = (params: VxeGridDefines.FooterCellClickEventParams<D>) => void
524
+ export type FooterCellDblclick<D = any> = (params: VxeGridDefines.FooterCellDblclickEventParams<D>) => void
525
+ export type FooterCellMenu<D = any> = (params: VxeGridDefines.FooterCellMenuEventParams<D>) => void
526
+ export type SortChange<D = any> = (params: VxeGridDefines.SortChangeEventParams<D>) => void
527
+ export type FilterChange<D = any> = (params: VxeGridDefines.FilterChangeEventParams<D>) => void
528
+ export type FilterVisible<D = any> = (params: VxeGridDefines.FilterVisibleEventParams<D>) => void
529
+ export type ResizableChange<D = any> = (params: VxeGridDefines.ResizableChangeEventParams<D>) => void
530
+ export type ToggleRowExpand<D = any> = (params: VxeGridDefines.ToggleRowExpandEventParams<D>) => void
531
+ export type ToggleTreeExpand<D = any> = (params: VxeGridDefines.ToggleTreeExpandEventParams<D>) => void
532
+ export type MenuClick<D = any> = (params: VxeGridDefines.MenuClickEventParams<D>) => void
533
+ export type EditClosed<D = any> = (params: VxeGridDefines.EditClosedEventParams<D>) => void
534
+ export type EditActived<D = any> = (params: VxeGridDefines.EditActivedEventParams<D>) => void
535
+ export type EditDisabled<D = any> = (params: VxeGridDefines.EditDisabledEventParams<D>) => void
536
+ export type ValidError<D = any> = (params: VxeGridDefines.ValidErrorEventParams<D>) => void
537
+ export type Scroll<D = any> = (params: VxeGridDefines.ScrollEventParams<D>) => void
538
+ export type Custom<D = any> = (params: VxeGridDefines.CustomEventParams<D>) => void
539
+
540
+ export type ProxyQuery<D = any> = (params: VxeGridDefines.ProxyQueryEventParams<D>) => void
541
+ export type ProxyDelete<D = any> = (params: VxeGridDefines.ProxyDeleteEventParams<D>) => void
542
+ export type ProxySave<D = any> = (params: VxeGridDefines.ProxySaveEventParams<D>) => void
543
+ export type PageChange<D = any> = (params: VxeGridDefines.PageChangeEventParams<D>) => void
544
+ export type FormSubmit<D = any> = (params: VxeGridDefines.FormSubmitEventParams<D>) => void
545
+ export type FormSubmitInvalid<D = any> = (params: VxeGridDefines.FormSubmitInvalidEventParams<D>) => void
546
+ export type FormReset<D = any> = (params: VxeGridDefines.FormResetEventParams<D>) => void
547
+ export type FormCollapse<D = any> = (params: VxeGridDefines.FormCollapseEventParams<D>) => void
548
+ export type ToolbarButtonClick<D = any> = (params: VxeGridDefines.ToolbarButtonClickEventParams<D>) => void
549
+ export type ToolbarToolClick<D = any> = (params: VxeGridDefines.ToolbarToolClickEventParams<D>) => void
550
+ export type Zoom<D = any> = (params: VxeGridDefines.ZoomEventParams<D>) => void
551
+ }
552
+
553
+ export namespace VxeGridSlotTypes {
554
+ export interface DefaultSlotParams {}
555
+ }
556
+
557
+ export interface VxeGridSlots<D = any> {
558
+ /**
559
+ * 自定义空数据时显示模板
560
+ */
561
+ empty?(params: {
562
+ $table: VxeTableConstructor<D>
563
+ $grid: VxeGridConstructor<D> | null | undefined
564
+ }): any
565
+ /**
566
+ * 自定义加载中模板
567
+ */
568
+ loading?(params: {
569
+ $table: VxeTableConstructor<D>
570
+ $grid: VxeGridConstructor<D> | null | undefined
571
+ }): any
572
+ /**
573
+ * 自定义表单模板
574
+ */
575
+ form?(params: {
576
+ $table: VxeTableConstructor<D>
577
+ $grid: VxeGridConstructor<D> | null | undefined
578
+ }): any
579
+ /**
580
+ * 自定义工具栏模板
581
+ */
582
+ toolbar?(params: {
583
+ $table: VxeTableConstructor<D>
584
+ $grid: VxeGridConstructor<D> | null | undefined
585
+ }): any
586
+ /**
587
+ * 自定义表格顶部模板
588
+ */
589
+ top?(params: {
590
+ $table: VxeTableConstructor<D>
591
+ $grid: VxeGridConstructor<D> | null | undefined
592
+ }): any
593
+ /**
594
+ * 表格底部模板
595
+ */
596
+ bottom?(params: {
597
+ $table: VxeTableConstructor<D>
598
+ $grid: VxeGridConstructor<D> | null | undefined
599
+ }): any
600
+ /**
601
+ * 自定义分页模板
602
+ */
603
+ pager?(params: {
604
+ $table: VxeTableConstructor<D>
605
+ $grid: VxeGridConstructor<D> | null | undefined
606
+ }): any
607
+
608
+ /**
609
+ * 自定义插槽模板
610
+ */
611
+ [key: string]: ((params: {
612
+ $table: VxeTableConstructor<D>
613
+ $grid: VxeGridConstructor<D> | null | undefined
614
+ row: D
615
+ rowIndex: number
616
+ $rowIndex: number
617
+ _rowIndex: number
618
+ column: VxeTableDefines.ColumnInfo<D>
619
+ columnIndex: number
620
+ $columnIndex: number
621
+ _columnIndex: number
622
+
623
+ checked?: boolean
624
+ indeterminate?: boolean
625
+
626
+ items: D[]
627
+
628
+ [key: string]: any
629
+ }) => any) | undefined
630
+ }
631
+
632
+ export const Grid: typeof VxeGrid
633
+ export default VxeGrid
@@ -1,5 +1,5 @@
1
1
  import { RenderFunction, SetupContext, Ref, ComponentPublicInstance, DefineComponent } from 'vue'
2
- import { defineVxeComponent, VxeComponentBaseOptions, VxeComponentEventParams } from '@vxe-ui/core'
2
+ import { defineVxeComponent, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSlotType } from '@vxe-ui/core'
3
3
 
4
4
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
5
5
 
@@ -35,7 +35,7 @@ export namespace VxeOptionPropTypes {
35
35
  default?: string | ((params: {
36
36
  option: any
37
37
  $select: VxeSelectConstructor
38
- }) => SlotVNodeType | SlotVNodeType[]) | null
38
+ }) => VxeComponentSlotType | VxeComponentSlotType[]) | null
39
39
  }
40
40
  }
41
41
 
@@ -26,7 +26,7 @@ export namespace VxePrintPropTypes {
26
26
  export type Title = string
27
27
  export type Content = string
28
28
  export type CustomStyle = string
29
- export type beforeMethod = (params: {
29
+ export type BeforeMethod = (params: {
30
30
  content: string
31
31
  options: VxePrintProps
32
32
  }) => string
@@ -36,7 +36,7 @@ export type VxePrintProps = {
36
36
  title?: VxePrintPropTypes.Title
37
37
  content?: VxePrintPropTypes.Content
38
38
  customStyle?: VxePrintPropTypes.CustomStyle
39
- beforeMethod?: VxePrintPropTypes.beforeMethod
39
+ beforeMethod?: VxePrintPropTypes.BeforeMethod
40
40
  }
41
41
 
42
42
  export interface PrintPrivateComputed {
@@ -62,7 +62,23 @@ export namespace VxePrintDefines {
62
62
  $print: VxePrintConstructor
63
63
  }
64
64
 
65
- export type PrintFunction = (options?: VxePrintProps) => Promise<any>
65
+ export type PrintFunction = (options?: VxePrintProps & {
66
+ /**
67
+ * 请使用 title
68
+ * @deprecated
69
+ */
70
+ sheetName?: string
71
+ /**
72
+ * 请使用 customStyle
73
+ * @deprecated
74
+ */
75
+ style?: string
76
+ /**
77
+ * 请使用 customStyle
78
+ * @deprecated
79
+ */
80
+ beforePrintMethod?: VxePrintPropTypes.BeforeMethod
81
+ }) => Promise<any>
66
82
  }
67
83
 
68
84
  export type VxePrintEventProps = {}