vxe-table 3.20.5 → 3.20.6

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