vxe-table 3.20.4 → 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 (155) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +106 -106
  3. package/es/grid/style.css +4 -0
  4. package/es/grid/style.min.css +1 -1
  5. package/es/index.css +1 -1
  6. package/es/index.esm.js +1 -2
  7. package/es/index.min.css +1 -1
  8. package/es/style.css +1 -1
  9. package/es/style.min.css +1 -1
  10. package/es/table/src/methods.js +51 -22
  11. package/es/table/src/table.js +36 -0
  12. package/es/table/src/util.js +3 -4
  13. package/es/table/style.css +48 -18
  14. package/es/ui/index.js +1 -1
  15. package/es/ui/src/log.js +1 -1
  16. package/es/vxe-grid/style.css +4 -0
  17. package/es/vxe-grid/style.min.css +1 -1
  18. package/es/vxe-table/style.css +48 -18
  19. package/lib/grid/style/style.css +4 -0
  20. package/lib/grid/style/style.min.css +1 -1
  21. package/lib/index.common.js +1 -2
  22. package/lib/index.css +1 -1
  23. package/lib/index.min.css +1 -1
  24. package/lib/index.umd.js +3252 -1877
  25. package/lib/index.umd.min.js +1 -1
  26. package/lib/style.css +1 -1
  27. package/lib/style.min.css +1 -1
  28. package/lib/table/src/methods.js +4 -3
  29. package/lib/table/src/methods.min.js +1 -1
  30. package/lib/table/src/table.js +44 -0
  31. package/lib/table/src/table.min.js +1 -1
  32. package/lib/table/src/util.js +4 -6
  33. package/lib/table/src/util.min.js +1 -1
  34. package/lib/table/style/style.css +48 -18
  35. package/lib/ui/index.js +1 -1
  36. package/lib/ui/index.min.js +1 -1
  37. package/lib/ui/src/log.js +1 -1
  38. package/lib/ui/src/log.min.js +1 -1
  39. package/lib/v-x-e-table/index.js +1 -2
  40. package/lib/v-x-e-table/index.min.js +1 -1
  41. package/lib/vxe-colgroup/index.js +1 -2
  42. package/lib/vxe-colgroup/index.min.js +1 -1
  43. package/lib/vxe-column/index.js +1 -2
  44. package/lib/vxe-column/index.min.js +1 -1
  45. package/lib/vxe-grid/index.js +1 -2
  46. package/lib/vxe-grid/index.min.js +1 -1
  47. package/lib/vxe-grid/style/style.css +4 -0
  48. package/lib/vxe-grid/style/style.min.css +1 -1
  49. package/lib/vxe-table/index.js +1 -2
  50. package/lib/vxe-table/index.min.js +1 -1
  51. package/lib/vxe-table/style/style.css +48 -18
  52. package/lib/vxe-toolbar/index.js +1 -2
  53. package/lib/vxe-toolbar/index.min.js +1 -1
  54. package/lib/vxe-ui/index.js +1 -2
  55. package/lib/vxe-ui/index.min.js +1 -1
  56. package/lib/vxe-v-x-e-table/index.js +1 -2
  57. package/lib/vxe-v-x-e-table/index.min.js +1 -1
  58. package/package.json +93 -93
  59. package/packages/colgroup/index.ts +22 -22
  60. package/packages/column/index.ts +22 -22
  61. package/packages/components.ts +42 -42
  62. package/packages/grid/index.ts +22 -22
  63. package/packages/grid/src/grid.ts +1935 -1935
  64. package/packages/index.ts +4 -4
  65. package/packages/locale/lang/ar-EG.ts +832 -832
  66. package/packages/locale/lang/de-DE.ts +832 -832
  67. package/packages/locale/lang/en-US.ts +832 -832
  68. package/packages/locale/lang/es-ES.ts +832 -832
  69. package/packages/locale/lang/fr-FR.ts +832 -832
  70. package/packages/locale/lang/hu-HU.ts +832 -832
  71. package/packages/locale/lang/hy-AM.ts +832 -832
  72. package/packages/locale/lang/id-ID.ts +832 -832
  73. package/packages/locale/lang/it-IT.ts +832 -832
  74. package/packages/locale/lang/ja-JP.ts +832 -832
  75. package/packages/locale/lang/ko-KR.ts +832 -832
  76. package/packages/locale/lang/ms-MY.ts +832 -832
  77. package/packages/locale/lang/nb-NO.ts +832 -832
  78. package/packages/locale/lang/pt-BR.ts +832 -832
  79. package/packages/locale/lang/ru-RU.ts +832 -832
  80. package/packages/locale/lang/th-TH.ts +832 -832
  81. package/packages/locale/lang/ug-CN.ts +832 -832
  82. package/packages/locale/lang/uk-UA.ts +832 -832
  83. package/packages/locale/lang/uz-UZ.ts +832 -832
  84. package/packages/locale/lang/vi-VN.ts +832 -832
  85. package/packages/locale/lang/zh-CHT.ts +832 -832
  86. package/packages/locale/lang/zh-CN.ts +832 -832
  87. package/packages/locale/lang/zh-HK.ts +3 -3
  88. package/packages/locale/lang/zh-MO.ts +3 -3
  89. package/packages/locale/lang/zh-TC.ts +3 -3
  90. package/packages/locale/lang/zh-TW.ts +3 -3
  91. package/packages/table/index.ts +49 -49
  92. package/packages/table/module/custom/mixin.ts +369 -369
  93. package/packages/table/module/custom/panel.ts +1461 -1461
  94. package/packages/table/module/edit/mixin.ts +1123 -1123
  95. package/packages/table/module/export/export-panel.ts +658 -658
  96. package/packages/table/module/export/import-panel.ts +319 -319
  97. package/packages/table/module/export/mixin.ts +1693 -1693
  98. package/packages/table/module/export/util.ts +24 -24
  99. package/packages/table/module/filter/mixin.ts +507 -507
  100. package/packages/table/module/filter/panel.ts +329 -329
  101. package/packages/table/module/keyboard/mixin.ts +513 -513
  102. package/packages/table/module/menu/mixin.ts +329 -329
  103. package/packages/table/module/menu/panel.ts +212 -212
  104. package/packages/table/module/validator/mixin.ts +626 -626
  105. package/packages/table/render/index.ts +1456 -1456
  106. package/packages/table/src/body.ts +969 -969
  107. package/packages/table/src/cell.ts +1285 -1285
  108. package/packages/table/src/column.ts +205 -205
  109. package/packages/table/src/columnInfo.ts +228 -228
  110. package/packages/table/src/footer.ts +388 -388
  111. package/packages/table/src/group.ts +51 -51
  112. package/packages/table/src/header.ts +602 -602
  113. package/packages/table/src/methods.ts +12939 -12912
  114. package/packages/table/src/props.ts +311 -311
  115. package/packages/table/src/store.ts +15 -15
  116. package/packages/table/src/table.ts +2502 -2460
  117. package/packages/table/src/util.ts +1012 -1012
  118. package/packages/toolbar/index.ts +18 -18
  119. package/packages/toolbar/src/toolbar.ts +856 -856
  120. package/packages/ui/index.ts +530 -530
  121. package/packages/ui/src/anime.ts +52 -52
  122. package/packages/ui/src/comp.ts +3 -3
  123. package/packages/ui/src/dom.ts +236 -236
  124. package/packages/ui/src/log.ts +8 -8
  125. package/packages/ui/src/utils.ts +56 -56
  126. package/packages/ui/src/vn.ts +65 -65
  127. package/packages/v-x-e-table/index.ts +4 -4
  128. package/styles/all.scss +7 -7
  129. package/styles/base.scss +16 -16
  130. package/styles/components/grid.scss +89 -85
  131. package/styles/components/icon.scss +225 -225
  132. package/styles/components/old-icon.scss +715 -715
  133. package/styles/components/table-module/all.scss +6 -6
  134. package/styles/components/table-module/custom.scss +527 -527
  135. package/styles/components/table-module/export.scss +130 -130
  136. package/styles/components/table-module/filter.scss +130 -130
  137. package/styles/components/table-module/menu.scss +81 -81
  138. package/styles/components/table.scss +2679 -2679
  139. package/styles/components/toolbar.scss +119 -119
  140. package/styles/default.scss +2 -2
  141. package/styles/helpers/baseMixin.scss +95 -95
  142. package/styles/index.scss +3 -3
  143. package/styles/modules.scss +5 -5
  144. package/styles/theme/base.scss +93 -93
  145. package/styles/theme/dark.scss +49 -49
  146. package/styles/theme/light.scss +44 -44
  147. package/styles/variable.scss +43 -43
  148. package/types/all.d.ts +53 -53
  149. package/types/index.d.ts +4 -4
  150. /package/es/{iconfont.1773644050430.ttf → iconfont.1773972972913.ttf} +0 -0
  151. /package/es/{iconfont.1773644050430.woff → iconfont.1773972972913.woff} +0 -0
  152. /package/es/{iconfont.1773644050430.woff2 → iconfont.1773972972913.woff2} +0 -0
  153. /package/lib/{iconfont.1773644050430.ttf → iconfont.1773972972913.ttf} +0 -0
  154. /package/lib/{iconfont.1773644050430.woff → iconfont.1773972972913.woff} +0 -0
  155. /package/lib/{iconfont.1773644050430.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