vxe-table 3.9.0-rc.8 → 3.9.0

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 (252) hide show
  1. package/README.md +1 -1
  2. package/es/grid/src/grid.js +120 -66
  3. package/es/grid/style.css +0 -1
  4. package/es/grid/style.min.css +1 -1
  5. package/es/index.esm.js +22 -3
  6. package/es/locale/lang/en-US.js +2 -8
  7. package/es/locale/lang/es-ES.js +2 -1
  8. package/es/locale/lang/hu-HU.d.ts +2 -0
  9. package/es/locale/lang/hu-HU.js +497 -501
  10. package/es/locale/lang/ja-JP.js +2 -8
  11. package/es/locale/lang/ko-KR.d.ts +2 -0
  12. package/es/locale/lang/ko-KR.js +2 -8
  13. package/es/locale/lang/pt-BR.js +2 -8
  14. package/es/locale/lang/ru-RU.d.ts +2 -0
  15. package/es/locale/lang/ru-RU.js +497 -503
  16. package/es/locale/lang/uk-UA.d.ts +2 -0
  17. package/es/locale/lang/uk-UA.js +667 -0
  18. package/es/locale/lang/vi-VN.js +2 -8
  19. package/es/locale/lang/zh-CHT.d.ts +2 -0
  20. package/es/locale/lang/zh-CHT.js +667 -0
  21. package/es/locale/lang/zh-CN.js +2 -8
  22. package/es/locale/lang/zh-HK.js +2 -2
  23. package/es/locale/lang/zh-MO.js +2 -2
  24. package/es/locale/lang/zh-TC.js +2 -673
  25. package/es/locale/lang/zh-TW.js +2 -2
  26. package/es/style.css +1 -1
  27. package/es/style.min.css +1 -1
  28. package/es/table/module/custom/panel.js +183 -173
  29. package/es/table/module/edit/mixin.js +33 -24
  30. package/es/table/module/export/export-panel.js +32 -4
  31. package/es/table/module/export/import-panel.js +25 -6
  32. package/es/table/module/export/mixin.js +11 -11
  33. package/es/table/module/menu/mixin.js +2 -2
  34. package/es/table/module/validator/mixin.js +4 -4
  35. package/es/table/render/index.js +17 -11
  36. package/es/table/src/body.js +1 -0
  37. package/es/table/src/columnInfo.js +3 -3
  38. package/es/table/src/methods.js +54 -42
  39. package/es/table/src/props.js +65 -15
  40. package/es/table/src/table.js +175 -60
  41. package/es/table/src/util.js +3 -2
  42. package/es/table/style.css +37 -48
  43. package/es/table/style.min.css +1 -1
  44. package/es/toolbar/src/toolbar.js +21 -7
  45. package/es/toolbar/style.css +0 -1
  46. package/es/toolbar/style.min.css +1 -1
  47. package/es/ui/index.js +5 -3
  48. package/es/ui/src/log.js +1 -1
  49. package/es/vxe-grid/style.css +0 -1
  50. package/es/vxe-grid/style.min.css +1 -1
  51. package/es/vxe-table/style.css +37 -48
  52. package/es/vxe-table/style.min.css +1 -1
  53. package/es/vxe-toolbar/style.css +0 -1
  54. package/es/vxe-toolbar/style.min.css +1 -1
  55. package/lib/colgroup/index.js +3 -3
  56. package/lib/colgroup/index.min.js +1 -1
  57. package/lib/column/index.js +3 -3
  58. package/lib/column/index.min.js +1 -1
  59. package/lib/components.js +9 -11
  60. package/lib/components.min.js +1 -1
  61. package/lib/grid/index.js +3 -3
  62. package/lib/grid/index.min.js +1 -1
  63. package/lib/grid/src/grid.js +581 -491
  64. package/lib/grid/src/grid.min.js +1 -1
  65. package/lib/grid/style/style.css +0 -1
  66. package/lib/grid/style/style.min.css +1 -1
  67. package/lib/index.common.js +3 -4
  68. package/lib/index.umd.js +9212 -17224
  69. package/lib/index.umd.min.js +1 -1
  70. package/lib/locale/lang/en-US.js +2 -8
  71. package/lib/locale/lang/en-US.min.js +1 -1
  72. package/lib/locale/lang/en-US.umd.js +2 -8
  73. package/lib/locale/lang/es-ES.js +2 -1
  74. package/lib/locale/lang/es-ES.min.js +1 -1
  75. package/lib/locale/lang/es-ES.umd.js +2 -1
  76. package/lib/locale/lang/hu-HU.d.ts +2 -0
  77. package/lib/locale/lang/hu-HU.js +497 -501
  78. package/lib/locale/lang/hu-HU.min.js +1 -1
  79. package/lib/locale/lang/hu-HU.umd.js +687 -0
  80. package/lib/locale/lang/ja-JP.js +2 -8
  81. package/lib/locale/lang/ja-JP.min.js +1 -1
  82. package/lib/locale/lang/ja-JP.umd.js +2 -8
  83. package/lib/locale/lang/ko-KR.d.ts +2 -0
  84. package/lib/locale/lang/ko-KR.js +2 -8
  85. package/lib/locale/lang/ko-KR.min.js +1 -1
  86. package/lib/locale/lang/ko-KR.umd.js +687 -0
  87. package/lib/locale/lang/pt-BR.js +2 -8
  88. package/lib/locale/lang/pt-BR.min.js +1 -1
  89. package/lib/locale/lang/pt-BR.umd.js +2 -8
  90. package/lib/locale/lang/ru-RU.d.ts +2 -0
  91. package/lib/locale/lang/ru-RU.js +497 -503
  92. package/lib/locale/lang/ru-RU.min.js +1 -1
  93. package/lib/locale/lang/ru-RU.umd.js +687 -0
  94. package/lib/locale/lang/uk-UA.d.ts +2 -0
  95. package/lib/locale/lang/uk-UA.js +673 -0
  96. package/lib/locale/lang/uk-UA.min.js +1 -0
  97. package/lib/locale/lang/uk-UA.umd.js +687 -0
  98. package/lib/locale/lang/vi-VN.js +2 -8
  99. package/lib/locale/lang/vi-VN.min.js +1 -1
  100. package/lib/locale/lang/zh-CHT.d.ts +2 -0
  101. package/lib/locale/lang/zh-CHT.js +673 -0
  102. package/lib/locale/lang/zh-CHT.min.js +1 -0
  103. package/lib/locale/lang/zh-CHT.umd.js +687 -0
  104. package/lib/locale/lang/zh-CN.js +2 -8
  105. package/lib/locale/lang/zh-CN.min.js +1 -1
  106. package/lib/locale/lang/zh-CN.umd.js +2 -8
  107. package/lib/locale/lang/zh-HK.js +2 -2
  108. package/lib/locale/lang/zh-HK.min.js +1 -1
  109. package/lib/locale/lang/zh-HK.umd.js +7 -677
  110. package/lib/locale/lang/zh-MO.js +2 -2
  111. package/lib/locale/lang/zh-MO.min.js +1 -1
  112. package/lib/locale/lang/zh-MO.umd.js +7 -677
  113. package/lib/locale/lang/zh-TC.js +3 -673
  114. package/lib/locale/lang/zh-TC.min.js +1 -1
  115. package/lib/locale/lang/zh-TC.umd.js +7 -677
  116. package/lib/locale/lang/zh-TW.js +2 -2
  117. package/lib/locale/lang/zh-TW.min.js +1 -1
  118. package/lib/locale/lang/zh-TW.umd.js +7 -677
  119. package/lib/style.css +1 -1
  120. package/lib/style.min.css +1 -1
  121. package/lib/table/index.js +4 -4
  122. package/lib/table/index.min.js +1 -1
  123. package/lib/table/module/custom/mixin.js +53 -44
  124. package/lib/table/module/custom/mixin.min.js +1 -1
  125. package/lib/table/module/custom/panel.js +310 -239
  126. package/lib/table/module/custom/panel.min.js +1 -1
  127. package/lib/table/module/edit/mixin.js +436 -371
  128. package/lib/table/module/edit/mixin.min.js +1 -1
  129. package/lib/table/module/export/export-panel.js +136 -106
  130. package/lib/table/module/export/export-panel.min.js +1 -1
  131. package/lib/table/module/export/import-panel.js +75 -54
  132. package/lib/table/module/export/import-panel.min.js +1 -1
  133. package/lib/table/module/export/mixin.js +592 -597
  134. package/lib/table/module/export/mixin.min.js +1 -1
  135. package/lib/table/module/export/util.js +6 -4
  136. package/lib/table/module/export/util.min.js +1 -1
  137. package/lib/table/module/filter/mixin.js +147 -118
  138. package/lib/table/module/filter/mixin.min.js +1 -1
  139. package/lib/table/module/filter/panel.js +86 -65
  140. package/lib/table/module/filter/panel.min.js +1 -1
  141. package/lib/table/module/keyboard/mixin.js +163 -151
  142. package/lib/table/module/keyboard/mixin.min.js +1 -1
  143. package/lib/table/module/menu/mixin.js +125 -114
  144. package/lib/table/module/menu/mixin.min.js +1 -1
  145. package/lib/table/module/menu/panel.js +36 -34
  146. package/lib/table/module/menu/panel.min.js +1 -1
  147. package/lib/table/module/validator/mixin.js +225 -214
  148. package/lib/table/module/validator/mixin.min.js +1 -1
  149. package/lib/table/render/index.js +401 -297
  150. package/lib/table/render/index.min.js +1 -1
  151. package/lib/table/src/body.js +411 -349
  152. package/lib/table/src/body.min.js +1 -1
  153. package/lib/table/src/cell.js +470 -344
  154. package/lib/table/src/cell.min.js +1 -1
  155. package/lib/table/src/column.js +10 -10
  156. package/lib/table/src/column.min.js +1 -1
  157. package/lib/table/src/columnInfo.js +46 -55
  158. package/lib/table/src/columnInfo.min.js +1 -1
  159. package/lib/table/src/footer.js +157 -132
  160. package/lib/table/src/footer.min.js +1 -1
  161. package/lib/table/src/group.js +1 -1
  162. package/lib/table/src/group.min.js +1 -1
  163. package/lib/table/src/header.js +170 -153
  164. package/lib/table/src/header.min.js +1 -1
  165. package/lib/table/src/methods.js +2758 -2478
  166. package/lib/table/src/methods.min.js +1 -1
  167. package/lib/table/src/props.js +33 -74
  168. package/lib/table/src/props.min.js +1 -1
  169. package/lib/table/src/table.js +519 -397
  170. package/lib/table/src/table.min.js +1 -1
  171. package/lib/table/src/util.js +143 -131
  172. package/lib/table/src/util.min.js +1 -1
  173. package/lib/table/style/style.css +37 -48
  174. package/lib/table/style/style.min.css +1 -1
  175. package/lib/toolbar/index.js +3 -3
  176. package/lib/toolbar/index.min.js +1 -1
  177. package/lib/toolbar/src/toolbar.js +332 -284
  178. package/lib/toolbar/src/toolbar.min.js +1 -1
  179. package/lib/toolbar/style/style.css +0 -1
  180. package/lib/toolbar/style/style.min.css +1 -1
  181. package/lib/ui/index.js +50 -41
  182. package/lib/ui/index.min.js +1 -1
  183. package/lib/ui/src/comp.js +2 -3
  184. package/lib/ui/src/comp.min.js +1 -1
  185. package/lib/ui/src/dom.js +29 -28
  186. package/lib/ui/src/dom.min.js +1 -1
  187. package/lib/ui/src/log.js +6 -4
  188. package/lib/ui/src/log.min.js +1 -1
  189. package/lib/ui/src/utils.js +7 -7
  190. package/lib/v-x-e-table/index.js +3 -4
  191. package/lib/v-x-e-table/index.min.js +1 -1
  192. package/lib/vxe-colgroup/index.js +3 -4
  193. package/lib/vxe-colgroup/index.min.js +1 -1
  194. package/lib/vxe-column/index.js +3 -4
  195. package/lib/vxe-column/index.min.js +1 -1
  196. package/lib/vxe-grid/index.js +3 -4
  197. package/lib/vxe-grid/index.min.js +1 -1
  198. package/lib/vxe-grid/style/style.css +0 -1
  199. package/lib/vxe-grid/style/style.min.css +1 -1
  200. package/lib/vxe-table/index.js +3 -4
  201. package/lib/vxe-table/index.min.js +1 -1
  202. package/lib/vxe-table/style/style.css +37 -48
  203. package/lib/vxe-table/style/style.min.css +1 -1
  204. package/lib/vxe-toolbar/index.js +3 -4
  205. package/lib/vxe-toolbar/index.min.js +1 -1
  206. package/lib/vxe-toolbar/style/style.css +0 -1
  207. package/lib/vxe-toolbar/style/style.min.css +1 -1
  208. package/lib/vxe-ui/index.js +3 -4
  209. package/lib/vxe-ui/index.min.js +1 -1
  210. package/lib/vxe-v-x-e-table/index.js +3 -4
  211. package/lib/vxe-v-x-e-table/index.min.js +1 -1
  212. package/package.json +5 -4
  213. package/packages/grid/src/grid.ts +127 -65
  214. package/packages/locale/lang/en-US.ts +2 -10
  215. package/packages/locale/lang/es-ES.ts +2 -1
  216. package/packages/locale/lang/hu-HU.ts +497 -503
  217. package/packages/locale/lang/ja-JP.ts +2 -10
  218. package/packages/locale/lang/ko-KR.ts +2 -10
  219. package/packages/locale/lang/pt-BR.ts +2 -10
  220. package/packages/locale/lang/ru-RU.ts +497 -505
  221. package/packages/locale/lang/uk-UA.ts +667 -0
  222. package/packages/locale/lang/vi-VN.ts +2 -10
  223. package/packages/locale/lang/zh-CHT.ts +667 -0
  224. package/packages/locale/lang/zh-CN.ts +2 -10
  225. package/packages/locale/lang/zh-HK.ts +2 -2
  226. package/packages/locale/lang/zh-MO.ts +2 -2
  227. package/packages/locale/lang/zh-TC.ts +2 -674
  228. package/packages/locale/lang/zh-TW.ts +2 -2
  229. package/packages/table/module/custom/panel.ts +186 -175
  230. package/packages/table/module/edit/mixin.ts +32 -23
  231. package/packages/table/module/export/export-panel.ts +36 -4
  232. package/packages/table/module/export/import-panel.ts +29 -6
  233. package/packages/table/module/export/mixin.ts +11 -11
  234. package/packages/table/module/menu/mixin.ts +2 -2
  235. package/packages/table/module/validator/mixin.ts +4 -4
  236. package/packages/table/render/index.ts +20 -11
  237. package/packages/table/src/body.ts +1 -0
  238. package/packages/table/src/columnInfo.ts +3 -3
  239. package/packages/table/src/methods.ts +53 -42
  240. package/packages/table/src/props.ts +68 -15
  241. package/packages/table/src/table.ts +183 -57
  242. package/packages/table/src/util.ts +3 -2
  243. package/packages/toolbar/src/toolbar.ts +21 -7
  244. package/packages/ui/index.ts +3 -1
  245. package/styles/components/table.scss +82 -17
  246. package/types/all.d.ts +1 -0
  247. /package/es/{iconfont.1726318179195.ttf → iconfont.1728348263835.ttf} +0 -0
  248. /package/es/{iconfont.1726318179195.woff → iconfont.1728348263835.woff} +0 -0
  249. /package/es/{iconfont.1726318179195.woff2 → iconfont.1728348263835.woff2} +0 -0
  250. /package/lib/{iconfont.1726318179195.ttf → iconfont.1728348263835.ttf} +0 -0
  251. /package/lib/{iconfont.1726318179195.woff → iconfont.1728348263835.woff} +0 -0
  252. /package/lib/{iconfont.1726318179195.woff2 → iconfont.1728348263835.woff2} +0 -0
@@ -23,6 +23,8 @@ import keyboardMixin from '../module/keyboard/mixin'
23
23
  import validatorMixin from '../module/validator/mixin'
24
24
  import customMixin from '../module/custom/mixin'
25
25
 
26
+ import type { VxeLoadingComponent, VxeTooltipComponent, VxeTabsConstructor, VxeTabsPrivateMethods } from 'vxe-pc-ui'
27
+
26
28
  const { getConfig, getI18n, renderer, globalResize, globalEvents, globalMixins } = VxeUI
27
29
 
28
30
  /**
@@ -124,6 +126,9 @@ export default {
124
126
  }
125
127
  },
126
128
  inject: {
129
+ $xeTabs: {
130
+ default: null
131
+ },
127
132
  $xeGrid: {
128
133
  default: null
129
134
  },
@@ -351,6 +356,9 @@ export default {
351
356
  }
352
357
  },
353
358
  computed: {
359
+ ...({} as {
360
+ $xeTabs(): (VxeTabsConstructor & VxeTabsPrivateMethods) | null
361
+ }),
354
362
  tableId () {
355
363
  const { id } = this
356
364
  if (id) {
@@ -362,13 +370,22 @@ export default {
362
370
  return ''
363
371
  },
364
372
  validOpts () {
365
- return Object.assign({ message: 'default' }, getConfig().table.validConfig, this.validConfig)
373
+ return this.computeValidOpts
374
+ },
375
+ computeValidOpts () {
376
+ return Object.assign({ message: 'default' }, XEUtils.clone(getConfig().table.validConfig, true), this.validConfig)
366
377
  },
367
378
  sXOpts () {
368
- return Object.assign({}, getConfig().table.scrollX, this.scrollX)
379
+ return this.computeSXOpts
380
+ },
381
+ computeSXOpts () {
382
+ return Object.assign({}, XEUtils.clone(getConfig().table.scrollX, true), this.scrollX)
369
383
  },
370
384
  sYOpts () {
371
- return Object.assign({}, getConfig().table.scrollY, this.scrollY)
385
+ return this.computeSYOpts
386
+ },
387
+ computeSYOpts () {
388
+ return Object.assign({}, XEUtils.clone(getConfig().table.scrollY, true), this.scrollY)
372
389
  },
373
390
  rowHeightMaps () {
374
391
  return {
@@ -379,28 +396,52 @@ export default {
379
396
  }
380
397
  },
381
398
  columnOpts () {
382
- return Object.assign({}, getConfig().table.columnConfig, this.columnConfig)
399
+ return this.computeColumnOpts
400
+ },
401
+ computeColumnOpts () {
402
+ return Object.assign({}, XEUtils.clone(getConfig().table.columnConfig, true), this.columnConfig)
383
403
  },
384
404
  rowOpts () {
385
- return Object.assign({}, getConfig().table.rowConfig, this.rowConfig)
405
+ return this.computeRowOpts
406
+ },
407
+ computeRowOpts () {
408
+ return Object.assign({}, XEUtils.clone(getConfig().table.rowConfig, true), this.rowConfig)
386
409
  },
387
410
  resizeOpts () {
388
- return Object.assign({}, getConfig().table.resizeConfig, this.resizeConfig)
411
+ return this.computeResizeOpts
412
+ },
413
+ computeResizeOpts () {
414
+ return Object.assign({}, XEUtils.clone(getConfig().table.resizeConfig, true), this.resizeConfig)
389
415
  },
390
416
  resizableOpts () {
391
- return Object.assign({}, getConfig().table.resizableConfig, this.resizableConfig)
417
+ return this.computeResizableOpts
418
+ },
419
+ computeResizableOpts () {
420
+ return Object.assign({}, XEUtils.clone(getConfig().table.resizableConfig, true), this.resizableConfig)
392
421
  },
393
422
  seqOpts () {
394
- return Object.assign({ startIndex: 0 }, getConfig().table.seqConfig, this.seqConfig)
423
+ return this.computeSeqOpts
424
+ },
425
+ computeSeqOpts () {
426
+ return Object.assign({ startIndex: 0 }, XEUtils.clone(getConfig().table.seqConfig, true), this.seqConfig)
395
427
  },
396
428
  radioOpts () {
397
- return Object.assign({}, getConfig().table.radioConfig, this.radioConfig)
429
+ return this.computeRadioOpts
430
+ },
431
+ computeRadioOpts () {
432
+ return Object.assign({}, XEUtils.clone(getConfig().table.radioConfig, true), this.radioConfig)
398
433
  },
399
434
  checkboxOpts () {
400
- return Object.assign({}, getConfig().table.checkboxConfig, this.checkboxConfig)
435
+ return this.computeCheckboxOpts
436
+ },
437
+ computeCheckboxOpts () {
438
+ return Object.assign({}, XEUtils.clone(getConfig().table.checkboxConfig, true), this.checkboxConfig)
401
439
  },
402
440
  tooltipOpts () {
403
- return Object.assign({}, getConfig().tooltip, getConfig().table.tooltipConfig, this.tooltipConfig)
441
+ return this.computeTooltipOpts
442
+ },
443
+ computeTooltipOpts () {
444
+ return Object.assign({}, XEUtils.clone(getConfig().tooltip, true), XEUtils.clone(getConfig().table.tooltipConfig, true), this.tooltipConfig)
404
445
  },
405
446
  tipConfig () {
406
447
  return { ...this.tooltipOpts }
@@ -409,32 +450,52 @@ export default {
409
450
  return Object.assign({ isArrow: false }, this.tooltipOpts)
410
451
  },
411
452
  editOpts () {
412
- return Object.assign({}, getConfig().table.editConfig, this.editConfig)
453
+ return this.computeEditOpts
454
+ },
455
+ computeEditOpts () {
456
+ return Object.assign({}, XEUtils.clone(getConfig().table.editConfig, true), this.editConfig)
413
457
  },
414
458
  sortOpts () {
415
- return Object.assign({ orders: ['asc', 'desc', null] }, getConfig().table.sortConfig, this.sortConfig)
459
+ return this.computeSortOpts
460
+ },
461
+ computeSortOpts () {
462
+ return Object.assign({ orders: ['asc', 'desc', null] }, XEUtils.clone(getConfig().table.sortConfig, true), this.sortConfig)
416
463
  },
417
464
  filterOpts () {
418
- return Object.assign({}, getConfig().table.filterConfig, this.filterConfig)
465
+ return this.computeFilterOpts
466
+ },
467
+ computeFilterOpts () {
468
+ return Object.assign({}, XEUtils.clone(getConfig().table.filterConfig, true), this.filterConfig)
419
469
  },
420
470
  mouseOpts () {
421
- return Object.assign({}, getConfig().table.mouseConfig, this.mouseConfig)
471
+ return this.computeMouseOpts
472
+ },
473
+ computeMouseOpts () {
474
+ return Object.assign({}, XEUtils.clone(getConfig().table.mouseConfig, true), this.mouseConfig)
422
475
  },
423
476
  areaOpts () {
424
- return Object.assign({}, getConfig().table.areaConfig, this.areaConfig)
477
+ return this.computeAreaOpts
478
+ },
479
+ computeAreaOpts () {
480
+ return Object.assign({}, XEUtils.clone(getConfig().table.areaConfig, true), this.areaConfig)
425
481
  },
426
482
  keyboardOpts () {
427
- return Object.assign({}, getConfig().table.keyboardConfig, this.keyboardConfig)
483
+ return this.computeKeyboardOpts
484
+ },
485
+ computeKeyboardOpts () {
486
+ return Object.assign({}, XEUtils.clone(getConfig().table.keyboardConfig, true), this.keyboardConfig)
428
487
  },
429
488
  clipOpts () {
430
- return Object.assign({}, getConfig().table.clipConfig, this.clipConfig)
489
+ return this.computeClipOpts
490
+ },
491
+ computeClipOpts () {
492
+ return Object.assign({}, XEUtils.clone(getConfig().table.clipConfig, true), this.clipConfig)
431
493
  },
432
494
  fnrOpts () {
433
- return Object.assign({}, getConfig().table.fnrConfig, this.fnrConfig)
495
+ return this.computeFNROpts
434
496
  },
435
- hasTip () {
436
- return true
437
- // return VXETable._tooltip
497
+ computeFNROpts () {
498
+ return Object.assign({}, XEUtils.clone(getConfig().table.fnrConfig, true), this.fnrConfig)
438
499
  },
439
500
  headerCtxMenu () {
440
501
  const headerOpts = this.ctxMenuOpts.header
@@ -451,9 +512,6 @@ export default {
451
512
  isCtxMenu () {
452
513
  return !!((this.contextMenu || this.menuConfig) && isEnableConf(this.ctxMenuOpts) && (this.headerCtxMenu.length || this.bodyCtxMenu.length || this.footerCtxMenu.length))
453
514
  },
454
- ctxMenuOpts () {
455
- return Object.assign({}, getConfig().table.menuConfig, this.contextMenu, this.menuConfig)
456
- },
457
515
  ctxMenuList () {
458
516
  const rest: any[] = []
459
517
  this.ctxMenuStore.list.forEach((list: any[]) => {
@@ -463,36 +521,63 @@ export default {
463
521
  })
464
522
  return rest
465
523
  },
524
+ ctxMenuOpts () {
525
+ return this.computeMenuOpts
526
+ },
527
+ computeMenuOpts () {
528
+ return Object.assign({}, XEUtils.clone(getConfig().table.menuConfig, true), this.contextMenu, this.menuConfig)
529
+ },
466
530
  exportOpts () {
467
- return Object.assign({}, getConfig().table.exportConfig, this.exportConfig)
531
+ return this.computeExportOpts
532
+ },
533
+ computeExportOpts () {
534
+ return Object.assign({}, XEUtils.clone(getConfig().table.exportConfig, true), this.exportConfig)
468
535
  },
469
536
  importOpts () {
470
- return Object.assign({}, getConfig().table.importConfig, this.importConfig)
537
+ return this.computeImportOpts
538
+ },
539
+ computeImportOpts () {
540
+ return Object.assign({}, XEUtils.clone(getConfig().table.importConfig, true), this.importConfig)
471
541
  },
472
542
  printOpts () {
473
- return Object.assign({}, getConfig().table.printConfig, this.printConfig)
543
+ return this.computePrintOpts
544
+ },
545
+ computePrintOpts () {
546
+ return Object.assign({}, XEUtils.clone(getConfig().table.printConfig, true), this.printConfig)
474
547
  },
475
548
  expandOpts () {
476
- return Object.assign({}, getConfig().table.expandConfig, this.expandConfig)
549
+ return this.computeExpandOpts
550
+ },
551
+ computeExpandOpts () {
552
+ return Object.assign({}, XEUtils.clone(getConfig().table.expandConfig, true), this.expandConfig)
477
553
  },
478
554
  treeOpts () {
479
- return Object.assign({}, getConfig().table.treeConfig, this.treeConfig)
555
+ return this.computeTreeOpts
556
+ },
557
+ computeTreeOpts () {
558
+ return Object.assign({}, XEUtils.clone(getConfig().table.treeConfig, true), this.treeConfig)
480
559
  },
481
560
  emptyOpts () {
482
- return Object.assign({}, getConfig().table.emptyRender, this.emptyRender)
561
+ return this.computeEmptyOpts
562
+ },
563
+ computeEmptyOpts () {
564
+ return Object.assign({}, XEUtils.clone(getConfig().table.emptyRender, true), this.emptyRender)
483
565
  },
484
566
  loadingOpts () {
485
- return Object.assign({}, getConfig().table.loadingConfig, this.loadingConfig)
567
+ return this.computeLoadingOpts
568
+ },
569
+ computeLoadingOpts () {
570
+ return Object.assign({}, XEUtils.clone(getConfig().table.loadingConfig, true), this.loadingConfig)
486
571
  },
487
572
  cellOffsetWidth () {
488
573
  return this.border ? Math.max(2, Math.ceil(this.scrollbarWidth / this.tableColumn.length)) : 1
489
574
  },
490
- computeCustomOpts () {
491
- return Object.assign({}, getConfig().table.customConfig, this.customConfig)
492
- },
493
575
  customOpts () {
494
576
  return this.computeCustomOpts
495
577
  },
578
+ computeCustomOpts () {
579
+ return Object.assign({}, XEUtils.clone(getConfig().table.customConfig, true), this.customConfig)
580
+ },
496
581
  autoWidthColumnList () {
497
582
  const { tableColumn, visibleColumn } = this
498
583
  return tableColumn.length || visibleColumn.length ? visibleColumn.filter((column: any) => column.width === 'auto' || column.minWidth === 'auto') : []
@@ -544,6 +629,12 @@ export default {
544
629
  return true
545
630
  }
546
631
  return false
632
+ },
633
+ tabsResizeFlag () {
634
+ const $xeTable = this
635
+ const $xeTabs = $xeTable.$xeTabs
636
+
637
+ return $xeTabs ? $xeTabs.reactData.resizeFlag : null
547
638
  }
548
639
  } as any,
549
640
  watch: {
@@ -605,6 +696,9 @@ export default {
605
696
  })
606
697
  }
607
698
  },
699
+ tabsResizeFlag () {
700
+ this.handleGlobalResizeEvent()
701
+ },
608
702
  mergeCells (value: any) {
609
703
  this.clearMergeCells()
610
704
  this.$nextTick(() => this.setMergeCells(value))
@@ -664,7 +758,7 @@ export default {
664
758
  fullColumnFieldData: {}
665
759
  })
666
760
 
667
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
761
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
668
762
  if (this.rowId) {
669
763
  warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField'])
670
764
  }
@@ -714,7 +808,7 @@ export default {
714
808
  }
715
809
  }
716
810
 
717
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
811
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
718
812
  const customOpts = this.customOpts
719
813
  if (!this.id && this.customConfig && (customOpts.storage === true || (customOpts.storage && customOpts.storage.resizable) || (customOpts.storage && customOpts.storage.visible))) {
720
814
  errLog('vxe.error.reqProp', ['id'])
@@ -755,7 +849,7 @@ export default {
755
849
  }
756
850
 
757
851
  // v4 中只支持对象类型
758
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
852
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
759
853
  // 在 v3.0 中废弃 context-menu
760
854
  if (this.contextMenu) {
761
855
  warnLog('vxe.error.delProp', ['context-menu', 'menu-config'])
@@ -799,7 +893,7 @@ export default {
799
893
  }
800
894
 
801
895
  // 检查是否有安装需要的模块
802
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
896
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
803
897
  if (this.editConfig && !this._insert) {
804
898
  errLog('vxe.error.reqModule', ['Edit'])
805
899
  }
@@ -846,7 +940,10 @@ export default {
846
940
  this.preventEvent(null, 'created')
847
941
  },
848
942
  mounted () {
849
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
943
+ const $xeTable = this
944
+ const props = $xeTable
945
+
946
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
850
947
  const { $listeners } = this
851
948
  if (!this.menuConfig && ($listeners['menu-click'] || $listeners['cell-menu'] || $listeners['header-cell-menu'] || $listeners['footer-cell-menu'])) {
852
949
  warnLog('vxe.error.reqProp', ['menu-config'])
@@ -855,12 +952,34 @@ export default {
855
952
  warnLog('vxe.error.reqProp', ['tooltip-config'])
856
953
  }
857
954
  }
955
+
956
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
957
+ // 使用已安装的组件,如果未安装则不渲染
958
+ const VxeUILoadingComponent = VxeUI.getComponent<VxeLoadingComponent>('VxeLoading')
959
+ const VxeUITooltipComponent = VxeUI.getComponent<VxeTooltipComponent>('VxeTooltip')
960
+
961
+ $xeTable.$nextTick(() => {
962
+ if (props.loading) {
963
+ if (!VxeUILoadingComponent) {
964
+ errLog('vxe.error.reqComp', ['vxe-loading'])
965
+ }
966
+ }
967
+ if ((props.showOverflow === true || props.showOverflow === 'tooltip') ||
968
+ (props.showHeaderOverflow === true || props.showHeaderOverflow === 'tooltip') ||
969
+ (props.showFooterOverflow === true || props.showFooterOverflow === 'tooltip') ||
970
+ props.tooltipConfig || props.editRules) {
971
+ if (!VxeUITooltipComponent) {
972
+ errLog('vxe.error.reqComp', ['vxe-tooltip'])
973
+ }
974
+ }
975
+ })
976
+ }
858
977
  if (this.autoResize) {
859
978
  const handleWrapperResize = this.resizeOpts.refreshDelay ? XEUtils.throttle(() => this.recalculate(true), this.resizeOpts.refreshDelay, { leading: true, trailing: true }) : null
860
979
  const resizeObserver = globalResize.create(handleWrapperResize
861
980
  ? () => {
862
981
  if (this.autoResize) {
863
- requestAnimationFrame(handleWrapperResize)
982
+ handleWrapperResize()
864
983
  }
865
984
  }
866
985
  : () => {
@@ -902,6 +1021,10 @@ export default {
902
1021
  this.preventEvent(null, 'destroyed')
903
1022
  },
904
1023
  render (h: CreateElement) {
1024
+ // 使用已安装的组件,如果未安装则不渲染
1025
+ const VxeUILoadingComponent = VxeUI.getComponent<VxeLoadingComponent>('VxeLoading')
1026
+ const VxeUITooltipComponent = VxeUI.getComponent<VxeTooltipComponent>('VxeTooltip')
1027
+
905
1028
  const {
906
1029
  _e,
907
1030
  $scopedSlots,
@@ -920,7 +1043,7 @@ export default {
920
1043
  treeConfig,
921
1044
  mouseConfig,
922
1045
  mouseOpts,
923
- vSize,
1046
+ computeSize,
924
1047
  validOpts,
925
1048
  showFooter,
926
1049
  overflowX,
@@ -940,7 +1063,6 @@ export default {
940
1063
  ctxMenuStore,
941
1064
  ctxMenuOpts,
942
1065
  footerTableData,
943
- hasTip,
944
1066
  columnOpts,
945
1067
  rowOpts,
946
1068
  checkboxOpts,
@@ -949,6 +1071,7 @@ export default {
949
1071
  } = this
950
1072
  const { leftList, rightList } = columnStore
951
1073
  const currLoading = this._isLoading || loading
1074
+ const vSize = computeSize
952
1075
  return h('div', {
953
1076
  class: ['vxe-table', 'vxe-table--render-default', `tid_${tId}`, vSize ? `size--${vSize}` : '', `border--${tableBorder}`, {
954
1077
  [`valid-msg--${validOpts.msgMode}`]: !!editRules,
@@ -968,6 +1091,7 @@ export default {
968
1091
  'is--fixed-left': leftList.length,
969
1092
  'is--fixed-right': rightList.length,
970
1093
  'is--animat': !!this.animat,
1094
+ 'is--padding': this.padding,
971
1095
  'is--round': this.round,
972
1096
  'is--stripe': !treeConfig && stripe,
973
1097
  'is--loading': currLoading,
@@ -1081,14 +1205,16 @@ export default {
1081
1205
  /**
1082
1206
  * 加载中
1083
1207
  */
1084
- h('vxe-loading', {
1085
- class: 'vxe-table--loading',
1086
- props: {
1087
- value: currLoading,
1088
- icon: loadingOpts.icon,
1089
- text: loadingOpts.text
1090
- }
1091
- }, this.callSlot($scopedSlots.loading, {}, h)),
1208
+ VxeUILoadingComponent
1209
+ ? h(VxeUILoadingComponent, {
1210
+ class: 'vxe-table--loading',
1211
+ props: {
1212
+ value: currLoading,
1213
+ icon: loadingOpts.icon,
1214
+ text: loadingOpts.text
1215
+ }
1216
+ }, this.callSlot($scopedSlots.loading, {}, h))
1217
+ : _e(),
1092
1218
  /**
1093
1219
  * 自定义列
1094
1220
  */
@@ -1149,8 +1275,8 @@ export default {
1149
1275
  /**
1150
1276
  * 通用提示
1151
1277
  */
1152
- hasTip
1153
- ? h('vxe-tooltip', {
1278
+ VxeUITooltipComponent
1279
+ ? h(VxeUITooltipComponent, {
1154
1280
  ref: 'commTip',
1155
1281
  props: {
1156
1282
  isArrow: false,
@@ -1161,8 +1287,8 @@ export default {
1161
1287
  /**
1162
1288
  * 工具提示
1163
1289
  */
1164
- hasTip
1165
- ? h('vxe-tooltip', {
1290
+ VxeUITooltipComponent
1291
+ ? h(VxeUITooltipComponent, {
1166
1292
  ref: 'tooltip',
1167
1293
  props: Object.assign({}, this.tipConfig, this.tooltipStore.currOpts)
1168
1294
  })
@@ -1170,8 +1296,8 @@ export default {
1170
1296
  /**
1171
1297
  * 校验提示
1172
1298
  */
1173
- hasTip && this.editRules && validOpts.showMessage && (validOpts.message === 'default' ? !height : validOpts.message === 'tooltip')
1174
- ? h('vxe-tooltip', {
1299
+ VxeUITooltipComponent && this.editRules && validOpts.showMessage && (validOpts.message === 'default' ? !height : validOpts.message === 'tooltip')
1300
+ ? h(VxeUITooltipComponent, {
1175
1301
  ref: 'validTip',
1176
1302
  class: [{
1177
1303
  'old-cell-valid': editRules && getConfig().cellVaildMode === 'obsolete'
@@ -151,7 +151,7 @@ export function assembleColumn (_vm: any) {
151
151
  const groupConfig = $xecolumn ? $xecolumn.columnConfig : null
152
152
  columnConfig.slots = _vm.$scopedSlots
153
153
  if (groupConfig) {
154
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
154
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
155
155
  if ($xecolumn.$options._componentTag === 'vxe-table-column') {
156
156
  errLog('vxe.error.groupTag', [`<vxe-table-colgroup title=${$xecolumn.title} ...>`, `<vxe-table-column title=${$xecolumn.title} ...>`])
157
157
  } else if ($xecolumn.$options._componentTag === 'vxe-column') {
@@ -271,7 +271,8 @@ function countTreeExpand (prevRow: any, params: any) {
271
271
  }
272
272
 
273
273
  export function getOffsetSize ($xetable: any) {
274
- return lineOffsetSizes[$xetable.vSize] || 0
274
+ const vSize = $xetable.computeSize
275
+ return lineOffsetSizes[vSize] || 0
275
276
  }
276
277
 
277
278
  export function calcTreeLine (params: any, items: any, rIndex: any) {
@@ -71,37 +71,37 @@ export default defineVxeComponent({
71
71
  const $xeToolbar = this
72
72
  const props = $xeToolbar
73
73
 
74
- return Object.assign({}, getConfig().toolbar.refresh, props.refresh) as VxeToolbarPropTypes.RefreshOpts
74
+ return Object.assign({}, XEUtils.clone(getConfig().toolbar.refresh, true), props.refresh) as VxeToolbarPropTypes.RefreshOpts
75
75
  },
76
76
  computeImportOpts () {
77
77
  const $xeToolbar = this
78
78
  const props = $xeToolbar
79
79
 
80
- return Object.assign({}, getConfig().toolbar.import, props.import) as VxeToolbarPropTypes.ImportOpts
80
+ return Object.assign({}, XEUtils.clone(getConfig().toolbar.import, true), props.import) as VxeToolbarPropTypes.ImportOpts
81
81
  },
82
82
  computeExportOpts () {
83
83
  const $xeToolbar = this
84
84
  const props = $xeToolbar
85
85
 
86
- return Object.assign({}, getConfig().toolbar.export, props.export) as VxeToolbarPropTypes.ExportOpts
86
+ return Object.assign({}, XEUtils.clone(getConfig().toolbar.export, true), props.export) as VxeToolbarPropTypes.ExportOpts
87
87
  },
88
88
  computePrintOpts () {
89
89
  const $xeToolbar = this
90
90
  const props = $xeToolbar
91
91
 
92
- return Object.assign({}, getConfig().toolbar.print, props.print) as VxeToolbarPropTypes.PrintOpts
92
+ return Object.assign({}, XEUtils.clone(getConfig().toolbar.print, true), props.print) as VxeToolbarPropTypes.PrintOpts
93
93
  },
94
94
  computeZoomOpts () {
95
95
  const $xeToolbar = this
96
96
  const props = $xeToolbar
97
97
 
98
- return Object.assign({}, getConfig().toolbar.zoom, props.zoom) as VxeToolbarPropTypes.ZoomOpts
98
+ return Object.assign({}, XEUtils.clone(getConfig().toolbar.zoom, true), props.zoom) as VxeToolbarPropTypes.ZoomOpts
99
99
  },
100
100
  computeCustomOpts () {
101
101
  const $xeToolbar = this
102
102
  const props = $xeToolbar
103
103
 
104
- return Object.assign({}, getConfig().toolbar.custom, props.custom) as VxeToolbarPropTypes.CustomOpts
104
+ return Object.assign({}, XEUtils.clone(getConfig().toolbar.custom, true), props.custom) as VxeToolbarPropTypes.CustomOpts
105
105
  },
106
106
  computeTableCustomOpts (this: any) {
107
107
  const $xeToolbar = this
@@ -357,7 +357,12 @@ export default defineVxeComponent({
357
357
  circle: child.circle,
358
358
  round: child.round,
359
359
  status: child.status,
360
- content: child.name
360
+ content: child.name,
361
+ title: child.title,
362
+ routerLink: child.routerLink,
363
+ permissionCode: child.permissionCode,
364
+ prefixTooltip: child.prefixTooltip,
365
+ suffixTooltip: child.suffixTooltip
361
366
  },
362
367
  on: {
363
368
  click: ({ $event }: any) => isBtn ? $xeToolbar.btnEvent($event, child) : $xeToolbar.tolEvent($event, child)
@@ -411,7 +416,11 @@ export default defineVxeComponent({
411
416
  round: item.round,
412
417
  status: item.status,
413
418
  content: item.name,
419
+ title: item.title,
420
+ routerLink: item.routerLink,
414
421
  permissionCode: item.permissionCode,
422
+ prefixTooltip: item.prefixTooltip,
423
+ suffixTooltip: item.suffixTooltip,
415
424
  destroyOnClose: item.destroyOnClose,
416
425
  placement: item.placement,
417
426
  transfer: item.transfer
@@ -479,6 +488,11 @@ export default defineVxeComponent({
479
488
  round: item.round,
480
489
  status: item.status,
481
490
  content: item.name,
491
+ title: item.title,
492
+ routerLink: item.routerLink,
493
+ permissionCode: item.permissionCode,
494
+ prefixTooltip: item.prefixTooltip,
495
+ suffixTooltip: item.suffixTooltip,
482
496
  destroyOnClose: item.destroyOnClose,
483
497
  placement: item.placement,
484
498
  transfer: item.transfer
@@ -17,6 +17,7 @@ VxeUI.setConfig({
17
17
  animat: true,
18
18
  delayHover: 250,
19
19
  autoResize: true,
20
+ padding: true,
20
21
  minHeight: 144,
21
22
  // keepSource: false,
22
23
  // showOverflow: null,
@@ -108,7 +109,8 @@ VxeUI.setConfig({
108
109
  editConfig: {
109
110
  // mode: 'cell',
110
111
  showIcon: true,
111
- showAsterisk: true
112
+ showAsterisk: true,
113
+ autoFocus: true
112
114
  },
113
115
  importConfig: {
114
116
  _typeMaps: {