vxe-table 4.19.0-beta.2 → 4.19.0-beta.3

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