vxe-table 4.18.4 → 4.18.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 (159) 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/grid/style.css +4 -0
  7. package/es/grid/style.min.css +1 -1
  8. package/es/index.css +1 -1
  9. package/es/index.min.css +1 -1
  10. package/es/style.css +1 -1
  11. package/es/style.min.css +1 -1
  12. package/es/table/src/table.js +82 -22
  13. package/es/table/src/util.js +3 -4
  14. package/es/table/style.css +48 -18
  15. package/es/ui/index.js +1 -1
  16. package/es/ui/src/log.js +1 -1
  17. package/es/vxe-grid/style.css +4 -0
  18. package/es/vxe-grid/style.min.css +1 -1
  19. package/es/vxe-table/style.css +48 -18
  20. package/lib/grid/style/style.css +4 -0
  21. package/lib/grid/style/style.min.css +1 -1
  22. package/lib/index.common.js +1 -2
  23. package/lib/index.css +1 -1
  24. package/lib/index.min.css +1 -1
  25. package/lib/index.umd.js +2833 -2733
  26. package/lib/index.umd.min.js +1 -1
  27. package/lib/style.css +1 -1
  28. package/lib/style.min.css +1 -1
  29. package/lib/table/src/table.js +7 -6
  30. package/lib/table/src/table.min.js +1 -1
  31. package/lib/table/src/util.js +4 -6
  32. package/lib/table/src/util.min.js +1 -1
  33. package/lib/table/style/style.css +48 -18
  34. package/lib/ui/index.js +1 -1
  35. package/lib/ui/index.min.js +1 -1
  36. package/lib/ui/src/log.js +1 -1
  37. package/lib/ui/src/log.min.js +1 -1
  38. package/lib/v-x-e-table/index.js +1 -2
  39. package/lib/v-x-e-table/index.min.js +1 -1
  40. package/lib/vxe-colgroup/index.js +1 -2
  41. package/lib/vxe-colgroup/index.min.js +1 -1
  42. package/lib/vxe-column/index.js +1 -2
  43. package/lib/vxe-column/index.min.js +1 -1
  44. package/lib/vxe-grid/index.js +1 -2
  45. package/lib/vxe-grid/index.min.js +1 -1
  46. package/lib/vxe-grid/style/style.css +4 -0
  47. package/lib/vxe-grid/style/style.min.css +1 -1
  48. package/lib/vxe-table/index.js +1 -2
  49. package/lib/vxe-table/index.min.js +1 -1
  50. package/lib/vxe-table/style/style.css +48 -18
  51. package/lib/vxe-toolbar/index.js +1 -2
  52. package/lib/vxe-toolbar/index.min.js +1 -1
  53. package/lib/vxe-ui/index.js +1 -2
  54. package/lib/vxe-ui/index.min.js +1 -1
  55. package/lib/vxe-v-x-e-table/index.js +1 -2
  56. package/lib/vxe-v-x-e-table/index.min.js +1 -1
  57. package/package.json +91 -91
  58. package/packages/colgroup/index.ts +22 -22
  59. package/packages/column/index.ts +22 -22
  60. package/packages/components.ts +43 -43
  61. package/packages/grid/index.ts +18 -18
  62. package/packages/grid/src/emits.ts +19 -19
  63. package/packages/grid/src/grid.ts +1768 -1768
  64. package/packages/grid/src/props.ts +23 -23
  65. package/packages/index.ts +4 -4
  66. package/packages/locale/lang/ar-EG.ts +832 -832
  67. package/packages/locale/lang/de-DE.ts +832 -832
  68. package/packages/locale/lang/en-US.ts +832 -832
  69. package/packages/locale/lang/es-ES.ts +832 -832
  70. package/packages/locale/lang/fr-FR.ts +832 -832
  71. package/packages/locale/lang/hu-HU.ts +832 -832
  72. package/packages/locale/lang/hy-AM.ts +832 -832
  73. package/packages/locale/lang/id-ID.ts +832 -832
  74. package/packages/locale/lang/it-IT.ts +832 -832
  75. package/packages/locale/lang/ja-JP.ts +832 -832
  76. package/packages/locale/lang/ko-KR.ts +832 -832
  77. package/packages/locale/lang/ms-MY.ts +832 -832
  78. package/packages/locale/lang/nb-NO.ts +832 -832
  79. package/packages/locale/lang/pt-BR.ts +832 -832
  80. package/packages/locale/lang/ru-RU.ts +832 -832
  81. package/packages/locale/lang/th-TH.ts +832 -832
  82. package/packages/locale/lang/ug-CN.ts +832 -832
  83. package/packages/locale/lang/uk-UA.ts +832 -832
  84. package/packages/locale/lang/uz-UZ.ts +832 -832
  85. package/packages/locale/lang/vi-VN.ts +832 -832
  86. package/packages/locale/lang/zh-CHT.ts +832 -832
  87. package/packages/locale/lang/zh-CN.ts +832 -832
  88. package/packages/locale/lang/zh-HK.ts +3 -3
  89. package/packages/locale/lang/zh-MO.ts +3 -3
  90. package/packages/locale/lang/zh-TC.ts +3 -3
  91. package/packages/locale/lang/zh-TW.ts +3 -3
  92. package/packages/table/index.ts +26 -26
  93. package/packages/table/module/custom/hook.ts +359 -359
  94. package/packages/table/module/custom/panel.ts +1331 -1331
  95. package/packages/table/module/edit/hook.ts +1032 -1032
  96. package/packages/table/module/export/export-panel.ts +567 -567
  97. package/packages/table/module/export/hook.ts +1654 -1654
  98. package/packages/table/module/export/import-panel.ts +266 -266
  99. package/packages/table/module/export/util.ts +24 -24
  100. package/packages/table/module/filter/hook.ts +468 -468
  101. package/packages/table/module/filter/panel.ts +301 -301
  102. package/packages/table/module/keyboard/hook.ts +495 -495
  103. package/packages/table/module/menu/hook.ts +325 -325
  104. package/packages/table/module/menu/panel.ts +201 -201
  105. package/packages/table/module/validator/hook.ts +631 -631
  106. package/packages/table/render/index.ts +1440 -1440
  107. package/packages/table/src/body.ts +932 -932
  108. package/packages/table/src/cell.ts +1290 -1290
  109. package/packages/table/src/column.ts +190 -190
  110. package/packages/table/src/columnInfo.ts +225 -225
  111. package/packages/table/src/emits.ts +123 -123
  112. package/packages/table/src/footer.ts +368 -368
  113. package/packages/table/src/group.ts +59 -59
  114. package/packages/table/src/header.ts +559 -559
  115. package/packages/table/src/props.ts +324 -324
  116. package/packages/table/src/store.ts +14 -14
  117. package/packages/table/src/table.ts +14001 -13939
  118. package/packages/table/src/use/cell-view.ts +44 -44
  119. package/packages/table/src/use/index.ts +1 -1
  120. package/packages/table/src/util.ts +1064 -1064
  121. package/packages/toolbar/index.ts +18 -18
  122. package/packages/toolbar/src/toolbar.ts +701 -701
  123. package/packages/ui/index.ts +530 -530
  124. package/packages/ui/src/anime.ts +52 -52
  125. package/packages/ui/src/comp.ts +3 -3
  126. package/packages/ui/src/dom.ts +236 -236
  127. package/packages/ui/src/log.ts +8 -8
  128. package/packages/ui/src/utils.ts +56 -56
  129. package/packages/ui/src/vn.ts +55 -55
  130. package/packages/v-x-e-table/index.d.ts +4 -4
  131. package/packages/v-x-e-table/index.ts +4 -4
  132. package/styles/all.scss +7 -7
  133. package/styles/base.scss +16 -16
  134. package/styles/components/grid.scss +89 -85
  135. package/styles/components/icon.scss +225 -225
  136. package/styles/components/old-icon.scss +715 -715
  137. package/styles/components/table-module/all.scss +6 -6
  138. package/styles/components/table-module/custom.scss +527 -527
  139. package/styles/components/table-module/export.scss +130 -130
  140. package/styles/components/table-module/filter.scss +130 -130
  141. package/styles/components/table-module/menu.scss +81 -81
  142. package/styles/components/table.scss +2679 -2679
  143. package/styles/components/toolbar.scss +119 -119
  144. package/styles/default.scss +2 -2
  145. package/styles/helpers/baseMixin.scss +95 -95
  146. package/styles/index.scss +4 -4
  147. package/styles/modules.scss +5 -5
  148. package/styles/theme/base.scss +93 -93
  149. package/styles/theme/dark.scss +49 -49
  150. package/styles/theme/light.scss +44 -44
  151. package/styles/variable.scss +43 -43
  152. package/types/all.d.ts +37 -37
  153. package/types/index.d.ts +4 -4
  154. /package/es/{iconfont.1773644074946.ttf → iconfont.1773972993993.ttf} +0 -0
  155. /package/es/{iconfont.1773644074946.woff → iconfont.1773972993993.woff} +0 -0
  156. /package/es/{iconfont.1773644074946.woff2 → iconfont.1773972993993.woff2} +0 -0
  157. /package/lib/{iconfont.1773644074946.ttf → iconfont.1773972993993.ttf} +0 -0
  158. /package/lib/{iconfont.1773644074946.woff → iconfont.1773972993993.woff} +0 -0
  159. /package/lib/{iconfont.1773644074946.woff2 → iconfont.1773972993993.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