vxe-table 4.23.19 → 4.23.21

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 (127) hide show
  1. package/dist/all.esm.js +289 -253
  2. package/dist/all.esm.min.js +3 -3
  3. package/dist/style.css +4 -1
  4. package/dist/style.mini.css +1 -1
  5. package/es/components.d.ts +1 -3
  6. package/es/components.js +1 -2
  7. package/es/esm.index.d.ts +7 -0
  8. package/es/esm.index.js +8 -0
  9. package/es/style.css +4 -1
  10. package/es/style.mini.css +1 -1
  11. package/es/table/src/table.js +6 -2
  12. package/es/table/style.css +4 -1
  13. package/es/table/style.mini.css +1 -1
  14. package/es/ui/abandon.d.ts +82 -0
  15. package/es/ui/abandon.js +90 -0
  16. package/es/ui/index.d.ts +1 -83
  17. package/es/ui/index.js +2 -89
  18. package/es/ui/src/log.js +1 -1
  19. package/es/vxe-table/style.css +4 -1
  20. package/es/vxe-table/style.mini.css +1 -1
  21. package/lib/components.d.ts +1 -3
  22. package/lib/components.js +1 -2
  23. package/lib/esm.index.d.ts +7 -0
  24. package/lib/esm.index.js +39 -0
  25. package/lib/index.umd.js +254 -249
  26. package/lib/index.umd.min.js +3 -3
  27. package/lib/style.css +4 -1
  28. package/lib/style.mini.css +1 -1
  29. package/lib/table/src/table.js +6 -2
  30. package/lib/table/style/style.css +4 -1
  31. package/lib/table/style/style.mini.css +1 -1
  32. package/lib/ui/abandon.d.ts +82 -0
  33. package/lib/ui/abandon.js +110 -0
  34. package/lib/ui/index.d.ts +1 -83
  35. package/lib/ui/index.js +3 -89
  36. package/lib/ui/src/log.js +1 -1
  37. package/lib/vxe-table/style/style.css +4 -1
  38. package/lib/vxe-table/style/style.mini.css +1 -1
  39. package/package.json +1 -1
  40. package/packages/colgroup/index.ts +22 -22
  41. package/packages/column/index.ts +22 -22
  42. package/packages/components.ts +42 -45
  43. package/packages/esm.index.ts +10 -0
  44. package/packages/grid/index.ts +18 -18
  45. package/packages/grid/src/emits.ts +5 -5
  46. package/packages/grid/src/grid.ts +2220 -2220
  47. package/packages/grid/src/props.ts +22 -22
  48. package/packages/index.ts +13 -13
  49. package/packages/locale/lang/ar-EG.ts +914 -914
  50. package/packages/locale/lang/de-DE.ts +914 -914
  51. package/packages/locale/lang/en-US.ts +914 -914
  52. package/packages/locale/lang/es-ES.ts +914 -914
  53. package/packages/locale/lang/fr-FR.ts +914 -914
  54. package/packages/locale/lang/hu-HU.ts +914 -914
  55. package/packages/locale/lang/hy-AM.ts +914 -914
  56. package/packages/locale/lang/id-ID.ts +914 -914
  57. package/packages/locale/lang/it-IT.ts +914 -914
  58. package/packages/locale/lang/ja-JP.ts +914 -914
  59. package/packages/locale/lang/ko-KR.ts +914 -914
  60. package/packages/locale/lang/ms-MY.ts +914 -914
  61. package/packages/locale/lang/nb-NO.ts +914 -914
  62. package/packages/locale/lang/pt-BR.ts +914 -914
  63. package/packages/locale/lang/ru-RU.ts +914 -914
  64. package/packages/locale/lang/th-TH.ts +914 -914
  65. package/packages/locale/lang/ug-CN.ts +914 -914
  66. package/packages/locale/lang/uk-UA.ts +914 -914
  67. package/packages/locale/lang/uz-UZ.ts +914 -914
  68. package/packages/locale/lang/vi-VN.ts +914 -914
  69. package/packages/locale/lang/zh-CHT.ts +914 -914
  70. package/packages/locale/lang/zh-CN.ts +914 -914
  71. package/packages/locale/lang/zh-HK.ts +914 -914
  72. package/packages/locale/lang/zh-MO.ts +914 -914
  73. package/packages/locale/lang/zh-TC.ts +914 -914
  74. package/packages/locale/lang/zh-TW.ts +914 -914
  75. package/packages/table/index.ts +26 -26
  76. package/packages/table/module/custom/hook.ts +510 -510
  77. package/packages/table/module/custom/panel.ts +2002 -2002
  78. package/packages/table/module/edit/hook.ts +1232 -1232
  79. package/packages/table/module/export/export-panel.ts +697 -697
  80. package/packages/table/module/export/hook.ts +2158 -2158
  81. package/packages/table/module/export/import-panel.ts +319 -319
  82. package/packages/table/module/export/util.ts +25 -25
  83. package/packages/table/module/filter/hook.ts +505 -505
  84. package/packages/table/module/filter/panel.ts +368 -368
  85. package/packages/table/module/keyboard/hook.ts +498 -498
  86. package/packages/table/module/menu/hook.ts +330 -330
  87. package/packages/table/module/menu/panel.ts +272 -272
  88. package/packages/table/module/validator/hook.ts +653 -653
  89. package/packages/table/render/index.ts +1819 -1819
  90. package/packages/table/src/body.ts +1078 -1078
  91. package/packages/table/src/cell.ts +1524 -1524
  92. package/packages/table/src/column.ts +192 -192
  93. package/packages/table/src/columnInfo.ts +232 -232
  94. package/packages/table/src/emits.ts +134 -134
  95. package/packages/table/src/footer.ts +425 -425
  96. package/packages/table/src/group.ts +67 -67
  97. package/packages/table/src/header.ts +661 -661
  98. package/packages/table/src/props.ts +336 -336
  99. package/packages/table/src/store.ts +14 -14
  100. package/packages/table/src/table.ts +8 -3
  101. package/packages/table/src/use/cell-view.ts +41 -41
  102. package/packages/table/src/use/index.ts +1 -1
  103. package/packages/table/src/util.ts +1206 -1206
  104. package/packages/toolbar/index.ts +18 -18
  105. package/packages/toolbar/src/toolbar.ts +768 -768
  106. package/packages/ui/abandon.ts +136 -0
  107. package/packages/ui/index.ts +404 -524
  108. package/packages/ui/src/anime.ts +51 -51
  109. package/packages/ui/src/comp.ts +3 -3
  110. package/packages/ui/src/dom.ts +466 -466
  111. package/packages/ui/src/log.ts +19 -19
  112. package/packages/ui/src/utils.ts +66 -66
  113. package/packages/ui/src/vn.ts +55 -55
  114. package/packages/v-x-e-table/index.d.ts +3 -3
  115. package/packages/v-x-e-table/index.ts +3 -3
  116. package/styles/components/table.scss +2 -1
  117. package/types/all.d.ts +76 -76
  118. package/types/index.d.ts +4 -4
  119. /package/dist/{iconfont.1794474448348.ttf → iconfont.1794983806256.ttf} +0 -0
  120. /package/dist/{iconfont.1794474448348.woff → iconfont.1794983806256.woff} +0 -0
  121. /package/dist/{iconfont.1794474448348.woff2 → iconfont.1794983806256.woff2} +0 -0
  122. /package/es/{iconfont.1794474448348.ttf → iconfont.1794983806256.ttf} +0 -0
  123. /package/es/{iconfont.1794474448348.woff → iconfont.1794983806256.woff} +0 -0
  124. /package/es/{iconfont.1794474448348.woff2 → iconfont.1794983806256.woff2} +0 -0
  125. /package/lib/{iconfont.1794474448348.ttf → iconfont.1794983806256.ttf} +0 -0
  126. /package/lib/{iconfont.1794474448348.woff → iconfont.1794983806256.woff} +0 -0
  127. /package/lib/{iconfont.1794474448348.woff2 → iconfont.1794983806256.woff2} +0 -0
@@ -1,524 +1,404 @@
1
- import { VxeUI } from '@vxe-ui/core'
2
- import { getFuncText } from './src/utils'
3
-
4
- import type { VxeUploadDefines, VxePrintDefines, VxeGlobalConfig } from 'vxe-pc-ui'
5
-
6
- export const version = process.env.VUE_APP_VXE_VERSION as string
7
-
8
- VxeUI.version = version
9
- VxeUI.tableVersion = version
10
-
11
- VxeUI.setConfig({
12
- emptyCell: ' ',
13
-
14
- table: {
15
- fit: true,
16
- showHeader: true,
17
- animat: true,
18
- delayHover: 250,
19
- autoResize: true,
20
- // minHeight: null,
21
- // keepSource: false,
22
- // showOverflow: null,
23
- // showHeaderOverflow: null,
24
- // showFooterOverflow: null,
25
- // resizeInterval: 500,
26
- // size: null,
27
- // zIndex: null,
28
- // stripe: false,
29
- // border: false,
30
- // round: false,
31
- // emptyText: '暂无数据',
32
- // emptyRender: {
33
- // name: ''
34
- // },
35
- // rowConfig: {
36
- // keyField: '_X_ROW_KEY' // 行数据的唯一主键字段名
37
- // },
38
- resizeConfig: {
39
- // refreshDelay: 20
40
- },
41
- resizableConfig: {
42
- dragMode: 'auto',
43
- showDragTip: true,
44
- isSyncAutoHeight: true,
45
- isSyncAutoWidth: true,
46
- minHeight: 18
47
- },
48
- currentRowConfig: {
49
- strict: true
50
- },
51
- currentColumnConfig: {
52
- strict: true
53
- },
54
- radioConfig: {
55
- // trigger: 'default'
56
- strict: true
57
- },
58
- rowDragConfig: {
59
- showIcon: true,
60
- animation: true,
61
- showGuidesStatus: true,
62
- showDragTip: true
63
- },
64
- columnDragConfig: {
65
- showIcon: true,
66
- animation: true,
67
- showGuidesStatus: true,
68
- showDragTip: true
69
- },
70
- checkboxConfig: {
71
- // trigger: 'default',
72
- strict: true
73
- },
74
- tooltipConfig: {
75
- mode: 'tooltip',
76
- enterable: true,
77
- defaultPlacement: 'top'
78
- },
79
- headerTooltipConfig: {
80
- mode: 'tooltip',
81
- enterable: true
82
- },
83
- footerTooltipConfig: {
84
- mode: 'tooltip',
85
- enterable: true
86
- },
87
- validConfig: {
88
- showErrorMessage: true,
89
- autoClear: true,
90
- autoPos: true,
91
- message: 'inline',
92
- msgMode: 'single',
93
- theme: 'beautify'
94
- },
95
- columnConfig: {
96
- autoOptions: {
97
- isCalcHeader: true,
98
- isCalcBody: true,
99
- isCalcFooter: true
100
- },
101
- maxFixedSize: 4
102
- },
103
- cellConfig: {
104
- padding: true
105
- },
106
- headerCellConfig: {
107
- height: 'unset'
108
- },
109
- footerCellConfig: {
110
- height: 'unset'
111
- },
112
- menuConfig: {
113
- // visibleMethod () {},
114
- // transfer: false,
115
- destroyOnClose: true
116
- },
117
- customConfig: {
118
- // enabled: false,
119
- storeDriver: 'localStorage',
120
- allowVisible: true,
121
- allowResizable: true,
122
- allowFixed: true,
123
- allowSort: true,
124
- allowAlign: true,
125
- showSortDragButton: true,
126
- showFooter: true,
127
- placement: 'top-right',
128
- // storage: false,
129
- storeOptions: {
130
- visible: true,
131
- resizable: true,
132
- sort: true,
133
- fixed: true,
134
- align: true,
135
- headerAlign: true,
136
- footerAlign: true,
137
- aggFunc: true
138
- },
139
- // autoAggGroupValues: false,
140
- // checkMethod () {},
141
- modalOptions: {
142
- showMaximize: true,
143
- mask: true,
144
- lockView: true,
145
- resize: true,
146
- escClosable: true
147
- },
148
- drawerOptions: {
149
- mask: true,
150
- lockView: true,
151
- escClosable: true,
152
- resize: true
153
- }
154
- },
155
- sortConfig: {
156
- // remote: false,
157
- // trigger: 'default',
158
- // orders: ['asc', 'desc', null],
159
- // sortMethod: null,
160
- showIcon: true,
161
- allowClear: true,
162
- allowBtn: true,
163
- iconLayout: 'vertical'
164
- },
165
- filterConfig: {
166
- // remote: false,
167
- // filterMethod: null,
168
- // isEvery: false,
169
- // transfer: false,
170
- destroyOnClose: true,
171
- multiple: true,
172
- showIcon: true,
173
- maxHeight: 320
174
- },
175
- floatingFilterConfig: {
176
- // enabled: false
177
- },
178
- aggregateConfig: {
179
- padding: true,
180
- placement: 'left',
181
- rowField: 'id',
182
- parentField: '_X_ROW_PARENT_KEY',
183
- childrenField: '_X_ROW_CHILDREN',
184
- mapChildrenField: '_X_ROW_CHILD_LIST',
185
- indent: 20,
186
- showIcon: true,
187
- maxGroupSize: 4,
188
- showAggFuncTitle: true
189
- },
190
- treeConfig: {
191
- padding: true,
192
- rowField: 'id',
193
- parentField: 'parentId',
194
- childrenField: 'children',
195
- hasChildField: 'hasChild',
196
- mapChildrenField: '_X_ROW_CHILD',
197
- indent: 20,
198
- showIcon: true,
199
- showRootLine: true
200
- },
201
- expandConfig: {
202
- // trigger: 'default',
203
- showIcon: true,
204
- mode: 'fixed'
205
- },
206
- editConfig: {
207
- // mode: 'cell',
208
- // cache: true,
209
- showIcon: true,
210
- showAsterisk: true,
211
- autoFocus: true,
212
- isReuseKeep: true
213
- },
214
- importConfig: {
215
- _typeMaps: {
216
- csv: 1,
217
- html: 1,
218
- xml: 1,
219
- txt: 1
220
- }
221
- },
222
- exportConfig: {
223
- _typeMaps: {
224
- csv: 1,
225
- html: 1,
226
- xml: 1,
227
- txt: 1
228
- }
229
- },
230
- printConfig: {},
231
- mouseConfig: {
232
- extension: true
233
- },
234
- keyboardConfig: {
235
- isAll: true,
236
- isEsc: true
237
- },
238
- areaConfig: {
239
- autoClear: true,
240
- selectCellByHeader: true,
241
- selectCellByBody: true,
242
- extendDirection: {
243
- top: true,
244
- left: true,
245
- bottom: true,
246
- right: true
247
- }
248
- },
249
- clipConfig: {
250
- isCopy: true,
251
- isCut: true,
252
- isPaste: true
253
- },
254
- fnrConfig: {
255
- isFind: true,
256
- isReplace: true
257
- },
258
- virtualXConfig: {
259
- // enabled: false,
260
- gt: 24,
261
- preSize: 1,
262
- oSize: 0
263
- },
264
- virtualYConfig: {
265
- // enabled: false,
266
- // mode: 'wheel',
267
- gt: 100,
268
- preSize: 1,
269
- oSize: 0
270
- },
271
- scrollbarConfig: {
272
- // xConfig: {
273
- // // position: 'bottom',
274
- // // visible: true
275
- // },
276
- // yConfig: {
277
- // // position: 'right',
278
- // // visible: true
279
- // }
280
- },
281
- undoRedoHistoryConfig: {
282
- stackSize: 50
283
- }
284
- },
285
- grid: {
286
- // size: null,
287
- // zoomConfig: {
288
- // escRestore: true
289
- // },
290
- formConfig: {
291
- enabled: true
292
- },
293
- pagerConfig: {
294
- enabled: true
295
- // perfect: false
296
- },
297
- toolbarConfig: {
298
- enabled: true
299
- // perfect: false
300
- },
301
- proxyConfig: {
302
- enabled: true,
303
- autoLoad: true,
304
- showLoading: true,
305
- showResponseMsg: true,
306
- showActionMsg: true,
307
- response: {
308
- list: 'list',
309
- result: 'result',
310
- total: 'page.total',
311
- footerData: 'footerData',
312
- message: 'message'
313
- }
314
- // beforeItem: null,
315
- // beforeColumn: null,
316
- // beforeQuery: null,
317
- // afterQuery: null,
318
- // beforeDelete: null,
319
- // afterDelete: null,
320
- // beforeSave: null,
321
- // afterSave: null
322
- }
323
- },
324
- toolbar: {
325
- // size: null,
326
- // import: {
327
- // mode: 'covering'
328
- // },
329
- // export: {
330
- // types: ['csv', 'html', 'xml', 'txt']
331
- // },
332
- // buttons: []
333
- },
334
-
335
- gantt: {}
336
- })
337
-
338
- const iconPrefix = 'vxe-table-icon-'
339
-
340
- VxeUI.setIcon({
341
- // table
342
- TABLE_SORT_ASC: iconPrefix + 'caret-up',
343
- TABLE_SORT_DESC: iconPrefix + 'caret-down',
344
- TABLE_FILTER_NONE: iconPrefix + 'funnel',
345
- TABLE_FILTER_MATCH: iconPrefix + 'funnel',
346
- TABLE_EDIT: iconPrefix + 'edit',
347
- TABLE_TITLE_PREFIX: iconPrefix + 'question-circle-fill',
348
- TABLE_TITLE_SUFFIX: iconPrefix + 'question-circle-fill',
349
- TABLE_TREE_LOADED: iconPrefix + 'spinner roll',
350
- TABLE_TREE_OPEN: iconPrefix + 'caret-right rotate90',
351
- TABLE_TREE_CLOSE: iconPrefix + 'caret-right',
352
- TABLE_EXPAND_LOADED: iconPrefix + 'spinner roll',
353
- TABLE_EXPAND_OPEN: iconPrefix + 'arrow-right rotate90',
354
- TABLE_EXPAND_CLOSE: iconPrefix + 'arrow-right',
355
- TABLE_CHECKBOX_CHECKED: iconPrefix + 'checkbox-checked-fill',
356
- TABLE_CHECKBOX_UNCHECKED: iconPrefix + 'checkbox-unchecked',
357
- TABLE_CHECKBOX_INDETERMINATE: iconPrefix + 'checkbox-indeterminate-fill',
358
- TABLE_CHECKBOX_DISABLED_UNCHECKED: iconPrefix + 'checkbox-unchecked-fill',
359
- TABLE_RADIO_CHECKED: iconPrefix + 'radio-checked-fill',
360
- TABLE_RADIO_UNCHECKED: iconPrefix + 'radio-unchecked',
361
- TABLE_RADIO_DISABLED_UNCHECKED: iconPrefix + 'radio-unchecked-fill',
362
- TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
363
- TABLE_CUSTOM_FIXED_LEFT: iconPrefix + 'fixed-left',
364
- TABLE_CUSTOM_FIXED_RIGHT: iconPrefix + 'fixed-right',
365
- TABLE_CUSTOM_ALIGN_LEFT: iconPrefix + 'align-left',
366
- TABLE_CUSTOM_ALIGN_CENTER: iconPrefix + 'align-center',
367
- TABLE_CUSTOM_ALIGN_RIGHT: iconPrefix + 'align-right',
368
- TABLE_CUSTOM_MOVE_UP: iconPrefix + 'arrows-up',
369
- TABLE_CUSTOM_MOVE_DN: iconPrefix + 'arrows-down',
370
- TABLE_CUSTOM_PUT_TOP: iconPrefix + 'top',
371
- TABLE_CUSTOM_PUT_BOTTOM: iconPrefix + 'bottom',
372
- TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
373
- TABLE_MENU_OPTION_LOADING: iconPrefix + 'repeat roll',
374
- TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
375
- TABLE_DRAG_COLUMN: iconPrefix + 'drag-handle',
376
- TABLE_DRAG_STATUS_ROW: iconPrefix + 'sort',
377
- TABLE_DRAG_STATUS_SUB_ROW: iconPrefix + 'add-sub',
378
- TABLE_DRAG_STATUS_AGG_GROUP: iconPrefix + 'grouping',
379
- TABLE_DRAG_STATUS_AGG_VALUES: iconPrefix + 'values',
380
- TABLE_DRAG_STATUS_COLUMN: iconPrefix + 'swap',
381
- TABLE_DRAG_DISABLED: iconPrefix + 'no-drop',
382
- TABLE_ROW_GROUP_OPEN: iconPrefix + 'arrow-right rotate90',
383
- TABLE_ROW_GROUP_CLOSE: iconPrefix + 'arrow-right',
384
- TABLE_AGGREGATE_GROUPING: iconPrefix + 'grouping',
385
- TABLE_AGGREGATE_VALUES: iconPrefix + 'values',
386
- TABLE_AGGREGATE_SORT: iconPrefix + 'drag-handle',
387
- TABLE_AGGREGATE_DELETE: iconPrefix + 'close',
388
-
389
- // toolbar
390
- TOOLBAR_TOOLS_REFRESH: iconPrefix + 'repeat',
391
- TOOLBAR_TOOLS_REFRESH_LOADING: iconPrefix + 'repeat roll',
392
- TOOLBAR_TOOLS_IMPORT: iconPrefix + 'upload',
393
- TOOLBAR_TOOLS_EXPORT: iconPrefix + 'download',
394
- TOOLBAR_TOOLS_PRINT: iconPrefix + 'print',
395
- TOOLBAR_TOOLS_FULLSCREEN: iconPrefix + 'fullscreen',
396
- TOOLBAR_TOOLS_MINIMIZE: iconPrefix + 'minimize',
397
- TOOLBAR_TOOLS_CUSTOM: iconPrefix + 'setting',
398
- TOOLBAR_TOOLS_FIXED_LEFT: iconPrefix + 'fixed-left',
399
- TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE: iconPrefix + 'fixed-left-fill',
400
- TOOLBAR_TOOLS_FIXED_RIGHT: iconPrefix + 'fixed-right',
401
- TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE: iconPrefix + 'fixed-right-fill'
402
- })
403
-
404
- /**
405
- * 已废弃
406
- * @deprecated
407
- */
408
- export const setup = (options?: VxeGlobalConfig) => {
409
- return VxeUI.setConfig(options)
410
- }
411
- VxeUI.setup = setup
412
- /**
413
- * 已废弃
414
- * @deprecated
415
- */
416
- export const config = (options?: VxeGlobalConfig) => {
417
- return VxeUI.setConfig(options)
418
- }
419
- VxeUI.config = config
420
- /**
421
- * 已废弃
422
- * @deprecated
423
- */
424
- export const t = (key: string, args?: any) => {
425
- return VxeUI.getI18n(key, args)
426
- }
427
- VxeUI.t = t
428
- /**
429
- * 已废弃
430
- * @deprecated
431
- */
432
- export const _t = (content: string | number | boolean | null | undefined, args?: any) => {
433
- return getFuncText(content, args)
434
- }
435
- VxeUI._t = _t
436
-
437
- /**
438
- * 已废弃,兼容老版本
439
- * @deprecated
440
- */
441
- export const VXETable = VxeUI
442
-
443
- /**
444
- * 已废弃,兼容老版本
445
- * @deprecated
446
- */
447
- export const saveFile: VxeUploadDefines.SaveFileFunction = (options) => {
448
- return VxeUI.saveFile(options)
449
- }
450
- /**
451
- * 已废弃,兼容老版本
452
- * @deprecated
453
- */
454
- export const readFile: VxeUploadDefines.ReadFileFunction = (options) => {
455
- return VxeUI.readFile(options)
456
- }
457
- /**
458
- * 已废弃,兼容老版本
459
- * @deprecated
460
- */
461
- export const print: VxePrintDefines.PrintFunction = (options) => {
462
- return VxeUI.print(options)
463
- }
464
- /**
465
- * 已废弃,兼容老版本
466
- * @deprecated
467
- */
468
- export const modal = {
469
- /**
470
- * 已废弃,兼容老版本
471
- * @deprecated
472
- */
473
- get(id: any) {
474
- return VxeUI.modal.get(id)
475
- },
476
- /**
477
- * 已废弃,兼容老版本
478
- * @deprecated
479
- */
480
- close(id: any) {
481
- return VxeUI.modal.close(id)
482
- },
483
- /**
484
- * 已废弃,兼容老版本
485
- * @deprecated
486
- */
487
- open(options: any) {
488
- return VxeUI.modal.open(options)
489
- },
490
- /**
491
- * 已废弃,兼容老版本
492
- * @deprecated
493
- */
494
- alert(content: any, title: any, options: any) {
495
- return VxeUI.modal.alert(content, title, options)
496
- },
497
- /**
498
- * 已废弃,兼容老版本
499
- * @deprecated
500
- */
501
- confirm(content: any, title: any, options: any) {
502
- return VxeUI.modal.confirm(content, title, options)
503
- },
504
- /**
505
- * 已废弃,兼容老版本
506
- * @deprecated
507
- */
508
- message(content: any, options: any) {
509
- return VxeUI.modal.message(content, options)
510
- },
511
- /**
512
- * 已废弃,兼容老版本
513
- * @deprecated
514
- */
515
- notification(content: any, title: any, options: any) {
516
- return VxeUI.modal.notification(content, title, options)
517
- }
518
- }
519
-
520
- export {
521
- VxeUI
522
- }
523
-
524
- export default VxeUI
1
+ import { VxeUI } from '@vxe-ui/core'
2
+
3
+ export const version = process.env.VUE_APP_VXE_VERSION as string
4
+
5
+ VxeUI.version = version
6
+ VxeUI.tableVersion = version
7
+
8
+ VxeUI.setConfig({
9
+ emptyCell: ' ',
10
+
11
+ table: {
12
+ fit: true,
13
+ showHeader: true,
14
+ animat: true,
15
+ delayHover: 250,
16
+ autoResize: true,
17
+ // minHeight: null,
18
+ // keepSource: false,
19
+ // showOverflow: null,
20
+ // showHeaderOverflow: null,
21
+ // showFooterOverflow: null,
22
+ // resizeInterval: 500,
23
+ // size: null,
24
+ // zIndex: null,
25
+ // stripe: false,
26
+ // border: false,
27
+ // round: false,
28
+ // emptyText: '暂无数据',
29
+ // emptyRender: {
30
+ // name: ''
31
+ // },
32
+ // rowConfig: {
33
+ // keyField: '_X_ROW_KEY' // 行数据的唯一主键字段名
34
+ // },
35
+ resizeConfig: {
36
+ // refreshDelay: 20
37
+ },
38
+ resizableConfig: {
39
+ dragMode: 'auto',
40
+ showDragTip: true,
41
+ isSyncAutoHeight: true,
42
+ isSyncAutoWidth: true,
43
+ minHeight: 18
44
+ },
45
+ currentRowConfig: {
46
+ strict: true
47
+ },
48
+ currentColumnConfig: {
49
+ strict: true
50
+ },
51
+ radioConfig: {
52
+ // trigger: 'default'
53
+ strict: true
54
+ },
55
+ rowDragConfig: {
56
+ showIcon: true,
57
+ animation: true,
58
+ showGuidesStatus: true,
59
+ showDragTip: true
60
+ },
61
+ columnDragConfig: {
62
+ showIcon: true,
63
+ animation: true,
64
+ showGuidesStatus: true,
65
+ showDragTip: true
66
+ },
67
+ checkboxConfig: {
68
+ // trigger: 'default',
69
+ strict: true
70
+ },
71
+ tooltipConfig: {
72
+ mode: 'tooltip',
73
+ enterable: true,
74
+ defaultPlacement: 'top'
75
+ },
76
+ headerTooltipConfig: {
77
+ mode: 'tooltip',
78
+ enterable: true
79
+ },
80
+ footerTooltipConfig: {
81
+ mode: 'tooltip',
82
+ enterable: true
83
+ },
84
+ validConfig: {
85
+ showErrorMessage: true,
86
+ autoClear: true,
87
+ autoPos: true,
88
+ message: 'inline',
89
+ msgMode: 'single',
90
+ theme: 'beautify'
91
+ },
92
+ columnConfig: {
93
+ autoOptions: {
94
+ isCalcHeader: true,
95
+ isCalcBody: true,
96
+ isCalcFooter: true
97
+ },
98
+ maxFixedSize: 4
99
+ },
100
+ cellConfig: {
101
+ padding: true
102
+ },
103
+ headerCellConfig: {
104
+ height: 'unset'
105
+ },
106
+ footerCellConfig: {
107
+ height: 'unset'
108
+ },
109
+ menuConfig: {
110
+ // visibleMethod () {},
111
+ // transfer: false,
112
+ destroyOnClose: true
113
+ },
114
+ customConfig: {
115
+ // enabled: false,
116
+ storeDriver: 'localStorage',
117
+ allowVisible: true,
118
+ allowResizable: true,
119
+ allowFixed: true,
120
+ allowSort: true,
121
+ allowAlign: true,
122
+ showSortDragButton: true,
123
+ showFooter: true,
124
+ placement: 'top-right',
125
+ // storage: false,
126
+ storeOptions: {
127
+ visible: true,
128
+ resizable: true,
129
+ sort: true,
130
+ fixed: true,
131
+ align: true,
132
+ headerAlign: true,
133
+ footerAlign: true,
134
+ aggFunc: true
135
+ },
136
+ // autoAggGroupValues: false,
137
+ // checkMethod () {},
138
+ modalOptions: {
139
+ showMaximize: true,
140
+ mask: true,
141
+ lockView: true,
142
+ resize: true,
143
+ escClosable: true
144
+ },
145
+ drawerOptions: {
146
+ mask: true,
147
+ lockView: true,
148
+ escClosable: true,
149
+ resize: true
150
+ }
151
+ },
152
+ sortConfig: {
153
+ // remote: false,
154
+ // trigger: 'default',
155
+ // orders: ['asc', 'desc', null],
156
+ // sortMethod: null,
157
+ showIcon: true,
158
+ allowClear: true,
159
+ allowBtn: true,
160
+ iconLayout: 'vertical'
161
+ },
162
+ filterConfig: {
163
+ // remote: false,
164
+ // filterMethod: null,
165
+ // isEvery: false,
166
+ // transfer: false,
167
+ destroyOnClose: true,
168
+ multiple: true,
169
+ showIcon: true,
170
+ maxHeight: 320
171
+ },
172
+ floatingFilterConfig: {
173
+ // enabled: false
174
+ },
175
+ aggregateConfig: {
176
+ padding: true,
177
+ placement: 'left',
178
+ rowField: 'id',
179
+ parentField: '_X_ROW_PARENT_KEY',
180
+ childrenField: '_X_ROW_CHILDREN',
181
+ mapChildrenField: '_X_ROW_CHILD_LIST',
182
+ indent: 20,
183
+ showIcon: true,
184
+ maxGroupSize: 4,
185
+ showAggFuncTitle: true
186
+ },
187
+ treeConfig: {
188
+ padding: true,
189
+ rowField: 'id',
190
+ parentField: 'parentId',
191
+ childrenField: 'children',
192
+ hasChildField: 'hasChild',
193
+ mapChildrenField: '_X_ROW_CHILD',
194
+ indent: 20,
195
+ showIcon: true,
196
+ showRootLine: true
197
+ },
198
+ expandConfig: {
199
+ // trigger: 'default',
200
+ showIcon: true,
201
+ mode: 'fixed'
202
+ },
203
+ editConfig: {
204
+ // mode: 'cell',
205
+ // cache: true,
206
+ showIcon: true,
207
+ showAsterisk: true,
208
+ autoFocus: true,
209
+ isReuseKeep: true
210
+ },
211
+ importConfig: {
212
+ _typeMaps: {
213
+ csv: 1,
214
+ html: 1,
215
+ xml: 1,
216
+ txt: 1
217
+ }
218
+ },
219
+ exportConfig: {
220
+ _typeMaps: {
221
+ csv: 1,
222
+ html: 1,
223
+ xml: 1,
224
+ txt: 1
225
+ }
226
+ },
227
+ printConfig: {},
228
+ mouseConfig: {
229
+ extension: true
230
+ },
231
+ keyboardConfig: {
232
+ isAll: true,
233
+ isEsc: true
234
+ },
235
+ areaConfig: {
236
+ autoClear: true,
237
+ selectCellByHeader: true,
238
+ selectCellByBody: true,
239
+ extendDirection: {
240
+ top: true,
241
+ left: true,
242
+ bottom: true,
243
+ right: true
244
+ }
245
+ },
246
+ clipConfig: {
247
+ isCopy: true,
248
+ isCut: true,
249
+ isPaste: true
250
+ },
251
+ fnrConfig: {
252
+ isFind: true,
253
+ isReplace: true
254
+ },
255
+ virtualXConfig: {
256
+ // enabled: false,
257
+ gt: 24,
258
+ preSize: 1,
259
+ oSize: 0
260
+ },
261
+ virtualYConfig: {
262
+ // enabled: false,
263
+ // mode: 'wheel',
264
+ gt: 100,
265
+ preSize: 1,
266
+ oSize: 0
267
+ },
268
+ scrollbarConfig: {
269
+ // xConfig: {
270
+ // // position: 'bottom',
271
+ // // visible: true
272
+ // },
273
+ // yConfig: {
274
+ // // position: 'right',
275
+ // // visible: true
276
+ // }
277
+ },
278
+ undoRedoHistoryConfig: {
279
+ stackSize: 50
280
+ }
281
+ },
282
+ grid: {
283
+ // size: null,
284
+ // zoomConfig: {
285
+ // escRestore: true
286
+ // },
287
+ formConfig: {
288
+ enabled: true
289
+ },
290
+ pagerConfig: {
291
+ enabled: true
292
+ // perfect: false
293
+ },
294
+ toolbarConfig: {
295
+ enabled: true
296
+ // perfect: false
297
+ },
298
+ proxyConfig: {
299
+ enabled: true,
300
+ autoLoad: true,
301
+ showLoading: true,
302
+ showResponseMsg: true,
303
+ showActionMsg: true,
304
+ response: {
305
+ list: 'list',
306
+ result: 'result',
307
+ total: 'page.total',
308
+ footerData: 'footerData',
309
+ message: 'message'
310
+ }
311
+ // beforeItem: null,
312
+ // beforeColumn: null,
313
+ // beforeQuery: null,
314
+ // afterQuery: null,
315
+ // beforeDelete: null,
316
+ // afterDelete: null,
317
+ // beforeSave: null,
318
+ // afterSave: null
319
+ }
320
+ },
321
+ toolbar: {
322
+ // size: null,
323
+ // import: {
324
+ // mode: 'covering'
325
+ // },
326
+ // export: {
327
+ // types: ['csv', 'html', 'xml', 'txt']
328
+ // },
329
+ // buttons: []
330
+ },
331
+
332
+ gantt: {}
333
+ })
334
+
335
+ const iconPrefix = 'vxe-table-icon-'
336
+
337
+ VxeUI.setIcon({
338
+ // table
339
+ TABLE_SORT_ASC: iconPrefix + 'caret-up',
340
+ TABLE_SORT_DESC: iconPrefix + 'caret-down',
341
+ TABLE_FILTER_NONE: iconPrefix + 'funnel',
342
+ TABLE_FILTER_MATCH: iconPrefix + 'funnel',
343
+ TABLE_EDIT: iconPrefix + 'edit',
344
+ TABLE_TITLE_PREFIX: iconPrefix + 'question-circle-fill',
345
+ TABLE_TITLE_SUFFIX: iconPrefix + 'question-circle-fill',
346
+ TABLE_TREE_LOADED: iconPrefix + 'spinner roll',
347
+ TABLE_TREE_OPEN: iconPrefix + 'caret-right rotate90',
348
+ TABLE_TREE_CLOSE: iconPrefix + 'caret-right',
349
+ TABLE_EXPAND_LOADED: iconPrefix + 'spinner roll',
350
+ TABLE_EXPAND_OPEN: iconPrefix + 'arrow-right rotate90',
351
+ TABLE_EXPAND_CLOSE: iconPrefix + 'arrow-right',
352
+ TABLE_CHECKBOX_CHECKED: iconPrefix + 'checkbox-checked-fill',
353
+ TABLE_CHECKBOX_UNCHECKED: iconPrefix + 'checkbox-unchecked',
354
+ TABLE_CHECKBOX_INDETERMINATE: iconPrefix + 'checkbox-indeterminate-fill',
355
+ TABLE_CHECKBOX_DISABLED_UNCHECKED: iconPrefix + 'checkbox-unchecked-fill',
356
+ TABLE_RADIO_CHECKED: iconPrefix + 'radio-checked-fill',
357
+ TABLE_RADIO_UNCHECKED: iconPrefix + 'radio-unchecked',
358
+ TABLE_RADIO_DISABLED_UNCHECKED: iconPrefix + 'radio-unchecked-fill',
359
+ TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
360
+ TABLE_CUSTOM_FIXED_LEFT: iconPrefix + 'fixed-left',
361
+ TABLE_CUSTOM_FIXED_RIGHT: iconPrefix + 'fixed-right',
362
+ TABLE_CUSTOM_ALIGN_LEFT: iconPrefix + 'align-left',
363
+ TABLE_CUSTOM_ALIGN_CENTER: iconPrefix + 'align-center',
364
+ TABLE_CUSTOM_ALIGN_RIGHT: iconPrefix + 'align-right',
365
+ TABLE_CUSTOM_MOVE_UP: iconPrefix + 'arrows-up',
366
+ TABLE_CUSTOM_MOVE_DN: iconPrefix + 'arrows-down',
367
+ TABLE_CUSTOM_PUT_TOP: iconPrefix + 'top',
368
+ TABLE_CUSTOM_PUT_BOTTOM: iconPrefix + 'bottom',
369
+ TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
370
+ TABLE_MENU_OPTION_LOADING: iconPrefix + 'repeat roll',
371
+ TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
372
+ TABLE_DRAG_COLUMN: iconPrefix + 'drag-handle',
373
+ TABLE_DRAG_STATUS_ROW: iconPrefix + 'sort',
374
+ TABLE_DRAG_STATUS_SUB_ROW: iconPrefix + 'add-sub',
375
+ TABLE_DRAG_STATUS_AGG_GROUP: iconPrefix + 'grouping',
376
+ TABLE_DRAG_STATUS_AGG_VALUES: iconPrefix + 'values',
377
+ TABLE_DRAG_STATUS_COLUMN: iconPrefix + 'swap',
378
+ TABLE_DRAG_DISABLED: iconPrefix + 'no-drop',
379
+ TABLE_ROW_GROUP_OPEN: iconPrefix + 'arrow-right rotate90',
380
+ TABLE_ROW_GROUP_CLOSE: iconPrefix + 'arrow-right',
381
+ TABLE_AGGREGATE_GROUPING: iconPrefix + 'grouping',
382
+ TABLE_AGGREGATE_VALUES: iconPrefix + 'values',
383
+ TABLE_AGGREGATE_SORT: iconPrefix + 'drag-handle',
384
+ TABLE_AGGREGATE_DELETE: iconPrefix + 'close',
385
+
386
+ // toolbar
387
+ TOOLBAR_TOOLS_REFRESH: iconPrefix + 'repeat',
388
+ TOOLBAR_TOOLS_REFRESH_LOADING: iconPrefix + 'repeat roll',
389
+ TOOLBAR_TOOLS_IMPORT: iconPrefix + 'upload',
390
+ TOOLBAR_TOOLS_EXPORT: iconPrefix + 'download',
391
+ TOOLBAR_TOOLS_PRINT: iconPrefix + 'print',
392
+ TOOLBAR_TOOLS_FULLSCREEN: iconPrefix + 'fullscreen',
393
+ TOOLBAR_TOOLS_MINIMIZE: iconPrefix + 'minimize',
394
+ TOOLBAR_TOOLS_CUSTOM: iconPrefix + 'setting',
395
+ TOOLBAR_TOOLS_FIXED_LEFT: iconPrefix + 'fixed-left',
396
+ TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE: iconPrefix + 'fixed-left-fill',
397
+ TOOLBAR_TOOLS_FIXED_RIGHT: iconPrefix + 'fixed-right',
398
+ TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE: iconPrefix + 'fixed-right-fill'
399
+ })
400
+
401
+ // 兼容老版本
402
+ export * from './abandon'
403
+
404
+ export default VxeUI