vxe-table 4.18.5 → 4.18.7

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 (145) 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/src/table.js +54 -0
  8. package/es/table/src/util.js +3 -4
  9. package/es/table/style.css +48 -18
  10. package/es/ui/index.js +1 -1
  11. package/es/ui/src/log.js +1 -1
  12. package/es/vxe-table/style.css +48 -18
  13. package/lib/index.common.js +1 -2
  14. package/lib/index.umd.js +2832 -2732
  15. package/lib/index.umd.min.js +1 -1
  16. package/lib/style.css +1 -1
  17. package/lib/table/src/table.js +5 -4
  18. package/lib/table/src/table.min.js +1 -1
  19. package/lib/table/src/util.js +4 -6
  20. package/lib/table/src/util.min.js +1 -1
  21. package/lib/table/style/style.css +48 -18
  22. package/lib/ui/index.js +1 -1
  23. package/lib/ui/index.min.js +1 -1
  24. package/lib/ui/src/log.js +1 -1
  25. package/lib/ui/src/log.min.js +1 -1
  26. package/lib/v-x-e-table/index.js +1 -2
  27. package/lib/v-x-e-table/index.min.js +1 -1
  28. package/lib/vxe-colgroup/index.js +1 -2
  29. package/lib/vxe-colgroup/index.min.js +1 -1
  30. package/lib/vxe-column/index.js +1 -2
  31. package/lib/vxe-column/index.min.js +1 -1
  32. package/lib/vxe-grid/index.js +1 -2
  33. package/lib/vxe-grid/index.min.js +1 -1
  34. package/lib/vxe-table/index.js +1 -2
  35. package/lib/vxe-table/index.min.js +1 -1
  36. package/lib/vxe-table/style/style.css +48 -18
  37. package/lib/vxe-toolbar/index.js +1 -2
  38. package/lib/vxe-toolbar/index.min.js +1 -1
  39. package/lib/vxe-ui/index.js +1 -2
  40. package/lib/vxe-ui/index.min.js +1 -1
  41. package/lib/vxe-v-x-e-table/index.js +1 -2
  42. package/lib/vxe-v-x-e-table/index.min.js +1 -1
  43. package/package.json +91 -91
  44. package/packages/colgroup/index.ts +22 -22
  45. package/packages/column/index.ts +22 -22
  46. package/packages/components.ts +43 -43
  47. package/packages/grid/index.ts +18 -18
  48. package/packages/grid/src/emits.ts +19 -19
  49. package/packages/grid/src/grid.ts +1768 -1768
  50. package/packages/grid/src/props.ts +23 -23
  51. package/packages/index.ts +4 -4
  52. package/packages/locale/lang/ar-EG.ts +832 -832
  53. package/packages/locale/lang/de-DE.ts +832 -832
  54. package/packages/locale/lang/en-US.ts +832 -832
  55. package/packages/locale/lang/es-ES.ts +832 -832
  56. package/packages/locale/lang/fr-FR.ts +832 -832
  57. package/packages/locale/lang/hu-HU.ts +832 -832
  58. package/packages/locale/lang/hy-AM.ts +832 -832
  59. package/packages/locale/lang/id-ID.ts +832 -832
  60. package/packages/locale/lang/it-IT.ts +832 -832
  61. package/packages/locale/lang/ja-JP.ts +832 -832
  62. package/packages/locale/lang/ko-KR.ts +832 -832
  63. package/packages/locale/lang/ms-MY.ts +832 -832
  64. package/packages/locale/lang/nb-NO.ts +832 -832
  65. package/packages/locale/lang/pt-BR.ts +832 -832
  66. package/packages/locale/lang/ru-RU.ts +832 -832
  67. package/packages/locale/lang/th-TH.ts +832 -832
  68. package/packages/locale/lang/ug-CN.ts +832 -832
  69. package/packages/locale/lang/uk-UA.ts +832 -832
  70. package/packages/locale/lang/uz-UZ.ts +832 -832
  71. package/packages/locale/lang/vi-VN.ts +832 -832
  72. package/packages/locale/lang/zh-CHT.ts +832 -832
  73. package/packages/locale/lang/zh-CN.ts +832 -832
  74. package/packages/locale/lang/zh-HK.ts +3 -3
  75. package/packages/locale/lang/zh-MO.ts +3 -3
  76. package/packages/locale/lang/zh-TC.ts +3 -3
  77. package/packages/locale/lang/zh-TW.ts +3 -3
  78. package/packages/table/index.ts +26 -26
  79. package/packages/table/module/custom/hook.ts +359 -359
  80. package/packages/table/module/custom/panel.ts +1331 -1331
  81. package/packages/table/module/edit/hook.ts +1032 -1032
  82. package/packages/table/module/export/export-panel.ts +567 -567
  83. package/packages/table/module/export/hook.ts +1654 -1654
  84. package/packages/table/module/export/import-panel.ts +266 -266
  85. package/packages/table/module/export/util.ts +24 -24
  86. package/packages/table/module/filter/hook.ts +468 -468
  87. package/packages/table/module/filter/panel.ts +301 -301
  88. package/packages/table/module/keyboard/hook.ts +495 -495
  89. package/packages/table/module/menu/hook.ts +325 -325
  90. package/packages/table/module/menu/panel.ts +201 -201
  91. package/packages/table/module/validator/hook.ts +631 -631
  92. package/packages/table/render/index.ts +1440 -1440
  93. package/packages/table/src/body.ts +932 -932
  94. package/packages/table/src/cell.ts +1290 -1290
  95. package/packages/table/src/column.ts +190 -190
  96. package/packages/table/src/columnInfo.ts +225 -225
  97. package/packages/table/src/emits.ts +123 -123
  98. package/packages/table/src/footer.ts +368 -368
  99. package/packages/table/src/group.ts +59 -59
  100. package/packages/table/src/header.ts +559 -559
  101. package/packages/table/src/props.ts +324 -324
  102. package/packages/table/src/store.ts +14 -14
  103. package/packages/table/src/table.ts +14004 -13947
  104. package/packages/table/src/use/cell-view.ts +44 -44
  105. package/packages/table/src/use/index.ts +1 -1
  106. package/packages/table/src/util.ts +1064 -1064
  107. package/packages/toolbar/index.ts +18 -18
  108. package/packages/toolbar/src/toolbar.ts +701 -701
  109. package/packages/ui/index.ts +530 -530
  110. package/packages/ui/src/anime.ts +52 -52
  111. package/packages/ui/src/comp.ts +3 -3
  112. package/packages/ui/src/dom.ts +236 -236
  113. package/packages/ui/src/log.ts +8 -8
  114. package/packages/ui/src/utils.ts +56 -56
  115. package/packages/ui/src/vn.ts +55 -55
  116. package/packages/v-x-e-table/index.d.ts +4 -4
  117. package/packages/v-x-e-table/index.ts +4 -4
  118. package/styles/all.scss +7 -7
  119. package/styles/base.scss +16 -16
  120. package/styles/components/grid.scss +89 -89
  121. package/styles/components/icon.scss +225 -225
  122. package/styles/components/old-icon.scss +715 -715
  123. package/styles/components/table-module/all.scss +6 -6
  124. package/styles/components/table-module/custom.scss +527 -527
  125. package/styles/components/table-module/export.scss +130 -130
  126. package/styles/components/table-module/filter.scss +130 -130
  127. package/styles/components/table-module/menu.scss +81 -81
  128. package/styles/components/table.scss +2679 -2679
  129. package/styles/components/toolbar.scss +119 -119
  130. package/styles/default.scss +2 -2
  131. package/styles/helpers/baseMixin.scss +95 -95
  132. package/styles/index.scss +4 -4
  133. package/styles/modules.scss +5 -5
  134. package/styles/theme/base.scss +93 -93
  135. package/styles/theme/dark.scss +49 -49
  136. package/styles/theme/light.scss +44 -44
  137. package/styles/variable.scss +43 -43
  138. package/types/all.d.ts +37 -37
  139. package/types/index.d.ts +4 -4
  140. /package/es/{iconfont.1773710736571.ttf → iconfont.1773991907408.ttf} +0 -0
  141. /package/es/{iconfont.1773710736571.woff → iconfont.1773991907408.woff} +0 -0
  142. /package/es/{iconfont.1773710736571.woff2 → iconfont.1773991907408.woff2} +0 -0
  143. /package/lib/{iconfont.1773710736571.ttf → iconfont.1773991907408.ttf} +0 -0
  144. /package/lib/{iconfont.1773710736571.woff → iconfont.1773991907408.woff} +0 -0
  145. /package/lib/{iconfont.1773710736571.woff2 → iconfont.1773991907408.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
- // 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
- },
77
- headerTooltipConfig: {
78
- enterable: true
79
- },
80
- footerTooltipConfig: {
81
- enterable: true
82
- },
83
- validConfig: {
84
- showErrorMessage: true,
85
- autoClear: true,
86
- autoPos: true,
87
- message: 'inline',
88
- msgMode: 'single',
89
- theme: 'beautify'
90
- },
91
- columnConfig: {
92
- autoOptions: {
93
- isCalcHeader: true,
94
- isCalcBody: true,
95
- isCalcFooter: true
96
- },
97
- maxFixedSize: 4
98
- },
99
- cellConfig: {
100
- padding: true
101
- },
102
- headerCellConfig: {
103
- height: 'unset'
104
- },
105
- footerCellConfig: {
106
- height: 'unset'
107
- },
108
- menuConfig: {
109
- // visibleMethod () {},
110
- // transfer: false,
111
- destroyOnClose: true
112
- },
113
- customConfig: {
114
- // enabled: false,
115
- allowVisible: true,
116
- allowResizable: true,
117
- allowFixed: true,
118
- allowSort: true,
119
- showFooter: true,
120
- placement: 'top-right',
121
- // storage: false,
122
- storeOptions: {
123
- visible: true,
124
- resizable: true,
125
- sort: true,
126
- fixed: true
127
- // rowGroup: false,
128
- // aggFunc: false
129
- },
130
- // autoAggGroupValues: false,
131
- // checkMethod () {},
132
- modalOptions: {
133
- showMaximize: true,
134
- mask: true,
135
- lockView: true,
136
- resize: true,
137
- escClosable: true
138
- },
139
- drawerOptions: {
140
- mask: true,
141
- lockView: true,
142
- escClosable: true,
143
- resize: true
144
- }
145
- },
146
- sortConfig: {
147
- // remote: false,
148
- // trigger: 'default',
149
- // orders: ['asc', 'desc', null],
150
- // sortMethod: null,
151
- showIcon: true,
152
- allowClear: true,
153
- allowBtn: true,
154
- iconLayout: 'vertical'
155
- },
156
- filterConfig: {
157
- // remote: false,
158
- // filterMethod: null,
159
- // isEvery: false,
160
- // transfer: false,
161
- destroyOnClose: true,
162
- multiple: true,
163
- showIcon: true,
164
- maxHeight: 280
165
- },
166
- floatingFilterConfig: {
167
- // enabled: false
168
- },
169
- aggregateConfig: {
170
- padding: true,
171
- rowField: 'id',
172
- parentField: '_X_ROW_PARENT_KEY',
173
- childrenField: '_X_ROW_CHILDREN',
174
- mapChildrenField: '_X_ROW_CHILD_LIST',
175
- indent: 20,
176
- showIcon: true,
177
- maxGroupSize: 4,
178
- showAggFuncTitle: true
179
- },
180
- treeConfig: {
181
- padding: true,
182
- rowField: 'id',
183
- parentField: 'parentId',
184
- childrenField: 'children',
185
- hasChildField: 'hasChild',
186
- mapChildrenField: '_X_ROW_CHILD',
187
- indent: 20,
188
- showIcon: true,
189
- showRootLine: true
190
- },
191
- expandConfig: {
192
- // trigger: 'default',
193
- showIcon: true,
194
- mode: 'fixed'
195
- },
196
- editConfig: {
197
- // mode: 'cell',
198
- showIcon: true,
199
- showAsterisk: true,
200
- autoFocus: true
201
- },
202
- importConfig: {
203
- _typeMaps: {
204
- csv: 1,
205
- html: 1,
206
- xml: 1,
207
- txt: 1
208
- }
209
- },
210
- exportConfig: {
211
- _typeMaps: {
212
- csv: 1,
213
- html: 1,
214
- xml: 1,
215
- txt: 1
216
- }
217
- },
218
- printConfig: {
219
- },
220
- mouseConfig: {
221
- extension: true
222
- },
223
- keyboardConfig: {
224
- isAll: true,
225
- isEsc: true
226
- },
227
- areaConfig: {
228
- autoClear: true,
229
- selectCellByHeader: true,
230
- selectCellByBody: true,
231
- extendDirection: {
232
- top: true,
233
- left: true,
234
- bottom: true,
235
- right: true
236
- }
237
- },
238
- clipConfig: {
239
- isCopy: true,
240
- isCut: true,
241
- isPaste: true
242
- },
243
- fnrConfig: {
244
- isFind: true,
245
- isReplace: true
246
- },
247
- virtualXConfig: {
248
- // enabled: false,
249
- gt: 24,
250
- preSize: 1,
251
- oSize: 0
252
- },
253
- virtualYConfig: {
254
- // enabled: false,
255
- // mode: 'wheel',
256
- gt: 100,
257
- preSize: 1,
258
- oSize: 0
259
- },
260
- scrollbarConfig: {
261
- // width: 14,
262
- // height: 14,
263
- x: {
264
- // position: 'bottom',
265
- visible: true
266
- },
267
- y: {
268
- // position: 'right',
269
- visible: true
270
- }
271
- },
272
- undoHistoryConfig: {
273
- isEditRow: true
274
- }
275
- },
276
- grid: {
277
- // size: null,
278
- // zoomConfig: {
279
- // escRestore: true
280
- // },
281
- formConfig: {
282
- enabled: true
283
- },
284
- pagerConfig: {
285
- enabled: true
286
- // perfect: false
287
- },
288
- toolbarConfig: {
289
- enabled: true
290
- // perfect: false
291
- },
292
- proxyConfig: {
293
- enabled: true,
294
- autoLoad: true,
295
- showLoading: true,
296
- showResponseMsg: true,
297
- showActionMsg: true,
298
- response: {
299
- list: 'list',
300
- result: 'result',
301
- total: 'page.total',
302
- footerData: 'footerData',
303
- message: 'message'
304
- }
305
- // beforeItem: null,
306
- // beforeColumn: null,
307
- // beforeQuery: null,
308
- // afterQuery: null,
309
- // beforeDelete: null,
310
- // afterDelete: null,
311
- // beforeSave: null,
312
- // afterSave: null
313
- }
314
- },
315
- toolbar: {
316
- // size: null,
317
- // import: {
318
- // mode: 'covering'
319
- // },
320
- // export: {
321
- // types: ['csv', 'html', 'xml', 'txt']
322
- // },
323
- // buttons: []
324
- },
325
-
326
- gantt: {}
327
- })
328
-
329
- const iconPrefix = 'vxe-table-icon-'
330
-
331
- VxeUI.setIcon({
332
- // table
333
- TABLE_SORT_ASC: iconPrefix + 'caret-up',
334
- TABLE_SORT_DESC: iconPrefix + 'caret-down',
335
- TABLE_FILTER_NONE: iconPrefix + 'funnel',
336
- TABLE_FILTER_MATCH: iconPrefix + 'funnel',
337
- TABLE_EDIT: iconPrefix + 'edit',
338
- TABLE_TITLE_PREFIX: iconPrefix + 'question-circle-fill',
339
- TABLE_TITLE_SUFFIX: iconPrefix + 'question-circle-fill',
340
- TABLE_TREE_LOADED: iconPrefix + 'spinner roll',
341
- TABLE_TREE_OPEN: iconPrefix + 'caret-right rotate90',
342
- TABLE_TREE_CLOSE: iconPrefix + 'caret-right',
343
- TABLE_EXPAND_LOADED: iconPrefix + 'spinner roll',
344
- TABLE_EXPAND_OPEN: iconPrefix + 'arrow-right rotate90',
345
- TABLE_EXPAND_CLOSE: iconPrefix + 'arrow-right',
346
- TABLE_CHECKBOX_CHECKED: iconPrefix + 'checkbox-checked-fill',
347
- TABLE_CHECKBOX_UNCHECKED: iconPrefix + 'checkbox-unchecked',
348
- TABLE_CHECKBOX_INDETERMINATE: iconPrefix + 'checkbox-indeterminate-fill',
349
- TABLE_CHECKBOX_DISABLED_UNCHECKED: iconPrefix + 'checkbox-unchecked-fill',
350
- TABLE_RADIO_CHECKED: iconPrefix + 'radio-checked-fill',
351
- TABLE_RADIO_UNCHECKED: iconPrefix + 'radio-unchecked',
352
- TABLE_RADIO_DISABLED_UNCHECKED: iconPrefix + 'radio-unchecked-fill',
353
- TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
354
- TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
355
- TABLE_MENU_OPTION_LOADING: iconPrefix + 'repeat roll',
356
- TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
357
- TABLE_DRAG_COLUMN: iconPrefix + 'drag-handle',
358
- TABLE_DRAG_STATUS_ROW: iconPrefix + 'sort',
359
- TABLE_DRAG_STATUS_SUB_ROW: iconPrefix + 'add-sub',
360
- TABLE_DRAG_STATUS_AGG_GROUP: iconPrefix + 'grouping',
361
- TABLE_DRAG_STATUS_AGG_VALUES: iconPrefix + 'values',
362
- TABLE_DRAG_STATUS_COLUMN: iconPrefix + 'swap',
363
- TABLE_DRAG_DISABLED: iconPrefix + 'no-drop',
364
- TABLE_ROW_GROUP_OPEN: iconPrefix + 'arrow-right rotate90',
365
- TABLE_ROW_GROUP_CLOSE: iconPrefix + 'arrow-right',
366
- TABLE_AGGREGATE_GROUPING: iconPrefix + 'grouping',
367
- TABLE_AGGREGATE_VALUES: iconPrefix + 'values',
368
- TABLE_AGGREGATE_SORT: iconPrefix + 'drag-handle',
369
- TABLE_AGGREGATE_DELETE: iconPrefix + 'close',
370
-
371
- // toolbar
372
- TOOLBAR_TOOLS_REFRESH: iconPrefix + 'repeat',
373
- TOOLBAR_TOOLS_REFRESH_LOADING: iconPrefix + 'repeat roll',
374
- TOOLBAR_TOOLS_IMPORT: iconPrefix + 'upload',
375
- TOOLBAR_TOOLS_EXPORT: iconPrefix + 'download',
376
- TOOLBAR_TOOLS_PRINT: iconPrefix + 'print',
377
- TOOLBAR_TOOLS_FULLSCREEN: iconPrefix + 'fullscreen',
378
- TOOLBAR_TOOLS_MINIMIZE: iconPrefix + 'minimize',
379
- TOOLBAR_TOOLS_CUSTOM: iconPrefix + 'custom-column',
380
- TOOLBAR_TOOLS_FIXED_LEFT: iconPrefix + 'fixed-left',
381
- TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE: iconPrefix + 'fixed-left-fill',
382
- TOOLBAR_TOOLS_FIXED_RIGHT: iconPrefix + 'fixed-right',
383
- TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE: iconPrefix + 'fixed-right-fill'
384
- })
385
-
386
- export const setTheme = VxeUI.setTheme
387
- export const getTheme = VxeUI.getTheme
388
- export const setConfig = VxeUI.setConfig
389
- export const getConfig = VxeUI.getConfig
390
- export const setIcon = VxeUI.setIcon
391
- export const getIcon = VxeUI.getIcon
392
- export const setLanguage = VxeUI.setLanguage
393
- export const setI18n = VxeUI.setI18n
394
- export const getI18n = VxeUI.getI18n
395
-
396
- export const globalEvents = VxeUI.globalEvents
397
- export const globalResize = VxeUI.globalResize
398
- export const renderer = VxeUI.renderer
399
- export const validators = VxeUI.validators
400
- export const menus = VxeUI.menus
401
- export const formats = VxeUI.formats
402
- export const commands = VxeUI.commands
403
- export const interceptor = VxeUI.interceptor
404
- export const clipboard = VxeUI.clipboard
405
- export const log = VxeUI.log
406
-
407
- export const hooks = VxeUI.hooks
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
+ // 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
+ },
77
+ headerTooltipConfig: {
78
+ enterable: true
79
+ },
80
+ footerTooltipConfig: {
81
+ enterable: true
82
+ },
83
+ validConfig: {
84
+ showErrorMessage: true,
85
+ autoClear: true,
86
+ autoPos: true,
87
+ message: 'inline',
88
+ msgMode: 'single',
89
+ theme: 'beautify'
90
+ },
91
+ columnConfig: {
92
+ autoOptions: {
93
+ isCalcHeader: true,
94
+ isCalcBody: true,
95
+ isCalcFooter: true
96
+ },
97
+ maxFixedSize: 4
98
+ },
99
+ cellConfig: {
100
+ padding: true
101
+ },
102
+ headerCellConfig: {
103
+ height: 'unset'
104
+ },
105
+ footerCellConfig: {
106
+ height: 'unset'
107
+ },
108
+ menuConfig: {
109
+ // visibleMethod () {},
110
+ // transfer: false,
111
+ destroyOnClose: true
112
+ },
113
+ customConfig: {
114
+ // enabled: false,
115
+ allowVisible: true,
116
+ allowResizable: true,
117
+ allowFixed: true,
118
+ allowSort: true,
119
+ showFooter: true,
120
+ placement: 'top-right',
121
+ // storage: false,
122
+ storeOptions: {
123
+ visible: true,
124
+ resizable: true,
125
+ sort: true,
126
+ fixed: true
127
+ // rowGroup: false,
128
+ // aggFunc: false
129
+ },
130
+ // autoAggGroupValues: false,
131
+ // checkMethod () {},
132
+ modalOptions: {
133
+ showMaximize: true,
134
+ mask: true,
135
+ lockView: true,
136
+ resize: true,
137
+ escClosable: true
138
+ },
139
+ drawerOptions: {
140
+ mask: true,
141
+ lockView: true,
142
+ escClosable: true,
143
+ resize: true
144
+ }
145
+ },
146
+ sortConfig: {
147
+ // remote: false,
148
+ // trigger: 'default',
149
+ // orders: ['asc', 'desc', null],
150
+ // sortMethod: null,
151
+ showIcon: true,
152
+ allowClear: true,
153
+ allowBtn: true,
154
+ iconLayout: 'vertical'
155
+ },
156
+ filterConfig: {
157
+ // remote: false,
158
+ // filterMethod: null,
159
+ // isEvery: false,
160
+ // transfer: false,
161
+ destroyOnClose: true,
162
+ multiple: true,
163
+ showIcon: true,
164
+ maxHeight: 280
165
+ },
166
+ floatingFilterConfig: {
167
+ // enabled: false
168
+ },
169
+ aggregateConfig: {
170
+ padding: true,
171
+ rowField: 'id',
172
+ parentField: '_X_ROW_PARENT_KEY',
173
+ childrenField: '_X_ROW_CHILDREN',
174
+ mapChildrenField: '_X_ROW_CHILD_LIST',
175
+ indent: 20,
176
+ showIcon: true,
177
+ maxGroupSize: 4,
178
+ showAggFuncTitle: true
179
+ },
180
+ treeConfig: {
181
+ padding: true,
182
+ rowField: 'id',
183
+ parentField: 'parentId',
184
+ childrenField: 'children',
185
+ hasChildField: 'hasChild',
186
+ mapChildrenField: '_X_ROW_CHILD',
187
+ indent: 20,
188
+ showIcon: true,
189
+ showRootLine: true
190
+ },
191
+ expandConfig: {
192
+ // trigger: 'default',
193
+ showIcon: true,
194
+ mode: 'fixed'
195
+ },
196
+ editConfig: {
197
+ // mode: 'cell',
198
+ showIcon: true,
199
+ showAsterisk: true,
200
+ autoFocus: true
201
+ },
202
+ importConfig: {
203
+ _typeMaps: {
204
+ csv: 1,
205
+ html: 1,
206
+ xml: 1,
207
+ txt: 1
208
+ }
209
+ },
210
+ exportConfig: {
211
+ _typeMaps: {
212
+ csv: 1,
213
+ html: 1,
214
+ xml: 1,
215
+ txt: 1
216
+ }
217
+ },
218
+ printConfig: {
219
+ },
220
+ mouseConfig: {
221
+ extension: true
222
+ },
223
+ keyboardConfig: {
224
+ isAll: true,
225
+ isEsc: true
226
+ },
227
+ areaConfig: {
228
+ autoClear: true,
229
+ selectCellByHeader: true,
230
+ selectCellByBody: true,
231
+ extendDirection: {
232
+ top: true,
233
+ left: true,
234
+ bottom: true,
235
+ right: true
236
+ }
237
+ },
238
+ clipConfig: {
239
+ isCopy: true,
240
+ isCut: true,
241
+ isPaste: true
242
+ },
243
+ fnrConfig: {
244
+ isFind: true,
245
+ isReplace: true
246
+ },
247
+ virtualXConfig: {
248
+ // enabled: false,
249
+ gt: 24,
250
+ preSize: 1,
251
+ oSize: 0
252
+ },
253
+ virtualYConfig: {
254
+ // enabled: false,
255
+ // mode: 'wheel',
256
+ gt: 100,
257
+ preSize: 1,
258
+ oSize: 0
259
+ },
260
+ scrollbarConfig: {
261
+ // width: 14,
262
+ // height: 14,
263
+ x: {
264
+ // position: 'bottom',
265
+ visible: true
266
+ },
267
+ y: {
268
+ // position: 'right',
269
+ visible: true
270
+ }
271
+ },
272
+ undoHistoryConfig: {
273
+ isEditRow: true
274
+ }
275
+ },
276
+ grid: {
277
+ // size: null,
278
+ // zoomConfig: {
279
+ // escRestore: true
280
+ // },
281
+ formConfig: {
282
+ enabled: true
283
+ },
284
+ pagerConfig: {
285
+ enabled: true
286
+ // perfect: false
287
+ },
288
+ toolbarConfig: {
289
+ enabled: true
290
+ // perfect: false
291
+ },
292
+ proxyConfig: {
293
+ enabled: true,
294
+ autoLoad: true,
295
+ showLoading: true,
296
+ showResponseMsg: true,
297
+ showActionMsg: true,
298
+ response: {
299
+ list: 'list',
300
+ result: 'result',
301
+ total: 'page.total',
302
+ footerData: 'footerData',
303
+ message: 'message'
304
+ }
305
+ // beforeItem: null,
306
+ // beforeColumn: null,
307
+ // beforeQuery: null,
308
+ // afterQuery: null,
309
+ // beforeDelete: null,
310
+ // afterDelete: null,
311
+ // beforeSave: null,
312
+ // afterSave: null
313
+ }
314
+ },
315
+ toolbar: {
316
+ // size: null,
317
+ // import: {
318
+ // mode: 'covering'
319
+ // },
320
+ // export: {
321
+ // types: ['csv', 'html', 'xml', 'txt']
322
+ // },
323
+ // buttons: []
324
+ },
325
+
326
+ gantt: {}
327
+ })
328
+
329
+ const iconPrefix = 'vxe-table-icon-'
330
+
331
+ VxeUI.setIcon({
332
+ // table
333
+ TABLE_SORT_ASC: iconPrefix + 'caret-up',
334
+ TABLE_SORT_DESC: iconPrefix + 'caret-down',
335
+ TABLE_FILTER_NONE: iconPrefix + 'funnel',
336
+ TABLE_FILTER_MATCH: iconPrefix + 'funnel',
337
+ TABLE_EDIT: iconPrefix + 'edit',
338
+ TABLE_TITLE_PREFIX: iconPrefix + 'question-circle-fill',
339
+ TABLE_TITLE_SUFFIX: iconPrefix + 'question-circle-fill',
340
+ TABLE_TREE_LOADED: iconPrefix + 'spinner roll',
341
+ TABLE_TREE_OPEN: iconPrefix + 'caret-right rotate90',
342
+ TABLE_TREE_CLOSE: iconPrefix + 'caret-right',
343
+ TABLE_EXPAND_LOADED: iconPrefix + 'spinner roll',
344
+ TABLE_EXPAND_OPEN: iconPrefix + 'arrow-right rotate90',
345
+ TABLE_EXPAND_CLOSE: iconPrefix + 'arrow-right',
346
+ TABLE_CHECKBOX_CHECKED: iconPrefix + 'checkbox-checked-fill',
347
+ TABLE_CHECKBOX_UNCHECKED: iconPrefix + 'checkbox-unchecked',
348
+ TABLE_CHECKBOX_INDETERMINATE: iconPrefix + 'checkbox-indeterminate-fill',
349
+ TABLE_CHECKBOX_DISABLED_UNCHECKED: iconPrefix + 'checkbox-unchecked-fill',
350
+ TABLE_RADIO_CHECKED: iconPrefix + 'radio-checked-fill',
351
+ TABLE_RADIO_UNCHECKED: iconPrefix + 'radio-unchecked',
352
+ TABLE_RADIO_DISABLED_UNCHECKED: iconPrefix + 'radio-unchecked-fill',
353
+ TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
354
+ TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
355
+ TABLE_MENU_OPTION_LOADING: iconPrefix + 'repeat roll',
356
+ TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
357
+ TABLE_DRAG_COLUMN: iconPrefix + 'drag-handle',
358
+ TABLE_DRAG_STATUS_ROW: iconPrefix + 'sort',
359
+ TABLE_DRAG_STATUS_SUB_ROW: iconPrefix + 'add-sub',
360
+ TABLE_DRAG_STATUS_AGG_GROUP: iconPrefix + 'grouping',
361
+ TABLE_DRAG_STATUS_AGG_VALUES: iconPrefix + 'values',
362
+ TABLE_DRAG_STATUS_COLUMN: iconPrefix + 'swap',
363
+ TABLE_DRAG_DISABLED: iconPrefix + 'no-drop',
364
+ TABLE_ROW_GROUP_OPEN: iconPrefix + 'arrow-right rotate90',
365
+ TABLE_ROW_GROUP_CLOSE: iconPrefix + 'arrow-right',
366
+ TABLE_AGGREGATE_GROUPING: iconPrefix + 'grouping',
367
+ TABLE_AGGREGATE_VALUES: iconPrefix + 'values',
368
+ TABLE_AGGREGATE_SORT: iconPrefix + 'drag-handle',
369
+ TABLE_AGGREGATE_DELETE: iconPrefix + 'close',
370
+
371
+ // toolbar
372
+ TOOLBAR_TOOLS_REFRESH: iconPrefix + 'repeat',
373
+ TOOLBAR_TOOLS_REFRESH_LOADING: iconPrefix + 'repeat roll',
374
+ TOOLBAR_TOOLS_IMPORT: iconPrefix + 'upload',
375
+ TOOLBAR_TOOLS_EXPORT: iconPrefix + 'download',
376
+ TOOLBAR_TOOLS_PRINT: iconPrefix + 'print',
377
+ TOOLBAR_TOOLS_FULLSCREEN: iconPrefix + 'fullscreen',
378
+ TOOLBAR_TOOLS_MINIMIZE: iconPrefix + 'minimize',
379
+ TOOLBAR_TOOLS_CUSTOM: iconPrefix + 'custom-column',
380
+ TOOLBAR_TOOLS_FIXED_LEFT: iconPrefix + 'fixed-left',
381
+ TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE: iconPrefix + 'fixed-left-fill',
382
+ TOOLBAR_TOOLS_FIXED_RIGHT: iconPrefix + 'fixed-right',
383
+ TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE: iconPrefix + 'fixed-right-fill'
384
+ })
385
+
386
+ export const setTheme = VxeUI.setTheme
387
+ export const getTheme = VxeUI.getTheme
388
+ export const setConfig = VxeUI.setConfig
389
+ export const getConfig = VxeUI.getConfig
390
+ export const setIcon = VxeUI.setIcon
391
+ export const getIcon = VxeUI.getIcon
392
+ export const setLanguage = VxeUI.setLanguage
393
+ export const setI18n = VxeUI.setI18n
394
+ export const getI18n = VxeUI.getI18n
395
+
396
+ export const globalEvents = VxeUI.globalEvents
397
+ export const globalResize = VxeUI.globalResize
398
+ export const renderer = VxeUI.renderer
399
+ export const validators = VxeUI.validators
400
+ export const menus = VxeUI.menus
401
+ export const formats = VxeUI.formats
402
+ export const commands = VxeUI.commands
403
+ export const interceptor = VxeUI.interceptor
404
+ export const clipboard = VxeUI.clipboard
405
+ export const log = VxeUI.log
406
+
407
+ export const hooks = VxeUI.hooks
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