vxe-table 3.9.0-rc.9 → 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 (222) 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 -1
  7. package/es/locale/lang/es-ES.js +2 -1
  8. package/es/locale/lang/hu-HU.js +2 -1
  9. package/es/locale/lang/ja-JP.js +2 -1
  10. package/es/locale/lang/ko-KR.js +2 -1
  11. package/es/locale/lang/pt-BR.js +2 -1
  12. package/es/locale/lang/ru-RU.js +2 -1
  13. package/es/locale/lang/uk-UA.js +2 -1
  14. package/es/locale/lang/vi-VN.js +2 -1
  15. package/es/locale/lang/zh-CHT.js +2 -1
  16. package/es/locale/lang/zh-CN.js +2 -1
  17. package/es/style.css +1 -1
  18. package/es/style.min.css +1 -1
  19. package/es/table/module/custom/panel.js +183 -173
  20. package/es/table/module/edit/mixin.js +33 -24
  21. package/es/table/module/export/export-panel.js +32 -4
  22. package/es/table/module/export/import-panel.js +25 -6
  23. package/es/table/module/export/mixin.js +11 -11
  24. package/es/table/module/menu/mixin.js +2 -2
  25. package/es/table/module/validator/mixin.js +4 -4
  26. package/es/table/render/index.js +17 -11
  27. package/es/table/src/body.js +1 -0
  28. package/es/table/src/columnInfo.js +3 -3
  29. package/es/table/src/methods.js +54 -42
  30. package/es/table/src/props.js +65 -15
  31. package/es/table/src/table.js +91 -57
  32. package/es/table/src/util.js +3 -2
  33. package/es/table/style.css +37 -48
  34. package/es/table/style.min.css +1 -1
  35. package/es/toolbar/src/toolbar.js +21 -7
  36. package/es/toolbar/style.css +0 -1
  37. package/es/toolbar/style.min.css +1 -1
  38. package/es/ui/index.js +5 -3
  39. package/es/ui/src/log.js +1 -1
  40. package/es/vxe-grid/style.css +0 -1
  41. package/es/vxe-grid/style.min.css +1 -1
  42. package/es/vxe-table/style.css +37 -48
  43. package/es/vxe-table/style.min.css +1 -1
  44. package/es/vxe-toolbar/style.css +0 -1
  45. package/es/vxe-toolbar/style.min.css +1 -1
  46. package/lib/colgroup/index.js +3 -3
  47. package/lib/colgroup/index.min.js +1 -1
  48. package/lib/column/index.js +3 -3
  49. package/lib/column/index.min.js +1 -1
  50. package/lib/components.js +9 -11
  51. package/lib/components.min.js +1 -1
  52. package/lib/grid/index.js +3 -3
  53. package/lib/grid/index.min.js +1 -1
  54. package/lib/grid/src/grid.js +581 -491
  55. package/lib/grid/src/grid.min.js +1 -1
  56. package/lib/grid/style/style.css +0 -1
  57. package/lib/grid/style/style.min.css +1 -1
  58. package/lib/index.common.js +3 -4
  59. package/lib/index.umd.js +9174 -17260
  60. package/lib/index.umd.min.js +1 -1
  61. package/lib/locale/lang/en-US.js +2 -1
  62. package/lib/locale/lang/en-US.min.js +1 -1
  63. package/lib/locale/lang/en-US.umd.js +2 -1
  64. package/lib/locale/lang/es-ES.js +2 -1
  65. package/lib/locale/lang/es-ES.min.js +1 -1
  66. package/lib/locale/lang/es-ES.umd.js +2 -1
  67. package/lib/locale/lang/hu-HU.js +2 -1
  68. package/lib/locale/lang/hu-HU.min.js +1 -1
  69. package/lib/locale/lang/hu-HU.umd.js +2 -1
  70. package/lib/locale/lang/ja-JP.js +2 -1
  71. package/lib/locale/lang/ja-JP.min.js +1 -1
  72. package/lib/locale/lang/ja-JP.umd.js +2 -1
  73. package/lib/locale/lang/ko-KR.js +2 -1
  74. package/lib/locale/lang/ko-KR.min.js +1 -1
  75. package/lib/locale/lang/ko-KR.umd.js +2 -1
  76. package/lib/locale/lang/pt-BR.js +2 -1
  77. package/lib/locale/lang/pt-BR.min.js +1 -1
  78. package/lib/locale/lang/pt-BR.umd.js +2 -1
  79. package/lib/locale/lang/ru-RU.js +2 -1
  80. package/lib/locale/lang/ru-RU.min.js +1 -1
  81. package/lib/locale/lang/ru-RU.umd.js +2 -1
  82. package/lib/locale/lang/uk-UA.js +2 -1
  83. package/lib/locale/lang/uk-UA.min.js +1 -1
  84. package/lib/locale/lang/uk-UA.umd.js +2 -1
  85. package/lib/locale/lang/vi-VN.js +2 -1
  86. package/lib/locale/lang/vi-VN.min.js +1 -1
  87. package/lib/locale/lang/zh-CHT.js +2 -1
  88. package/lib/locale/lang/zh-CHT.min.js +1 -1
  89. package/lib/locale/lang/zh-CHT.umd.js +2 -1
  90. package/lib/locale/lang/zh-CN.js +2 -1
  91. package/lib/locale/lang/zh-CN.min.js +1 -1
  92. package/lib/locale/lang/zh-CN.umd.js +2 -1
  93. package/lib/style.css +1 -1
  94. package/lib/style.min.css +1 -1
  95. package/lib/table/index.js +4 -4
  96. package/lib/table/index.min.js +1 -1
  97. package/lib/table/module/custom/mixin.js +53 -44
  98. package/lib/table/module/custom/mixin.min.js +1 -1
  99. package/lib/table/module/custom/panel.js +310 -239
  100. package/lib/table/module/custom/panel.min.js +1 -1
  101. package/lib/table/module/edit/mixin.js +436 -371
  102. package/lib/table/module/edit/mixin.min.js +1 -1
  103. package/lib/table/module/export/export-panel.js +136 -106
  104. package/lib/table/module/export/export-panel.min.js +1 -1
  105. package/lib/table/module/export/import-panel.js +75 -54
  106. package/lib/table/module/export/import-panel.min.js +1 -1
  107. package/lib/table/module/export/mixin.js +592 -597
  108. package/lib/table/module/export/mixin.min.js +1 -1
  109. package/lib/table/module/export/util.js +6 -4
  110. package/lib/table/module/export/util.min.js +1 -1
  111. package/lib/table/module/filter/mixin.js +147 -118
  112. package/lib/table/module/filter/mixin.min.js +1 -1
  113. package/lib/table/module/filter/panel.js +86 -65
  114. package/lib/table/module/filter/panel.min.js +1 -1
  115. package/lib/table/module/keyboard/mixin.js +163 -151
  116. package/lib/table/module/keyboard/mixin.min.js +1 -1
  117. package/lib/table/module/menu/mixin.js +125 -114
  118. package/lib/table/module/menu/mixin.min.js +1 -1
  119. package/lib/table/module/menu/panel.js +36 -34
  120. package/lib/table/module/menu/panel.min.js +1 -1
  121. package/lib/table/module/validator/mixin.js +225 -214
  122. package/lib/table/module/validator/mixin.min.js +1 -1
  123. package/lib/table/render/index.js +401 -297
  124. package/lib/table/render/index.min.js +1 -1
  125. package/lib/table/src/body.js +411 -349
  126. package/lib/table/src/body.min.js +1 -1
  127. package/lib/table/src/cell.js +470 -344
  128. package/lib/table/src/cell.min.js +1 -1
  129. package/lib/table/src/column.js +10 -10
  130. package/lib/table/src/column.min.js +1 -1
  131. package/lib/table/src/columnInfo.js +46 -55
  132. package/lib/table/src/columnInfo.min.js +1 -1
  133. package/lib/table/src/footer.js +157 -132
  134. package/lib/table/src/footer.min.js +1 -1
  135. package/lib/table/src/group.js +1 -1
  136. package/lib/table/src/group.min.js +1 -1
  137. package/lib/table/src/header.js +170 -153
  138. package/lib/table/src/header.min.js +1 -1
  139. package/lib/table/src/methods.js +2758 -2478
  140. package/lib/table/src/methods.min.js +1 -1
  141. package/lib/table/src/props.js +33 -74
  142. package/lib/table/src/props.min.js +1 -1
  143. package/lib/table/src/table.js +465 -424
  144. package/lib/table/src/table.min.js +1 -1
  145. package/lib/table/src/util.js +143 -131
  146. package/lib/table/src/util.min.js +1 -1
  147. package/lib/table/style/style.css +37 -48
  148. package/lib/table/style/style.min.css +1 -1
  149. package/lib/toolbar/index.js +3 -3
  150. package/lib/toolbar/index.min.js +1 -1
  151. package/lib/toolbar/src/toolbar.js +332 -284
  152. package/lib/toolbar/src/toolbar.min.js +1 -1
  153. package/lib/toolbar/style/style.css +0 -1
  154. package/lib/toolbar/style/style.min.css +1 -1
  155. package/lib/ui/index.js +50 -41
  156. package/lib/ui/index.min.js +1 -1
  157. package/lib/ui/src/comp.js +2 -3
  158. package/lib/ui/src/comp.min.js +1 -1
  159. package/lib/ui/src/dom.js +29 -28
  160. package/lib/ui/src/dom.min.js +1 -1
  161. package/lib/ui/src/log.js +6 -4
  162. package/lib/ui/src/log.min.js +1 -1
  163. package/lib/ui/src/utils.js +7 -7
  164. package/lib/v-x-e-table/index.js +3 -4
  165. package/lib/v-x-e-table/index.min.js +1 -1
  166. package/lib/vxe-colgroup/index.js +3 -4
  167. package/lib/vxe-colgroup/index.min.js +1 -1
  168. package/lib/vxe-column/index.js +3 -4
  169. package/lib/vxe-column/index.min.js +1 -1
  170. package/lib/vxe-grid/index.js +3 -4
  171. package/lib/vxe-grid/index.min.js +1 -1
  172. package/lib/vxe-grid/style/style.css +0 -1
  173. package/lib/vxe-grid/style/style.min.css +1 -1
  174. package/lib/vxe-table/index.js +3 -4
  175. package/lib/vxe-table/index.min.js +1 -1
  176. package/lib/vxe-table/style/style.css +37 -48
  177. package/lib/vxe-table/style/style.min.css +1 -1
  178. package/lib/vxe-toolbar/index.js +3 -4
  179. package/lib/vxe-toolbar/index.min.js +1 -1
  180. package/lib/vxe-toolbar/style/style.css +0 -1
  181. package/lib/vxe-toolbar/style/style.min.css +1 -1
  182. package/lib/vxe-ui/index.js +3 -4
  183. package/lib/vxe-ui/index.min.js +1 -1
  184. package/lib/vxe-v-x-e-table/index.js +3 -4
  185. package/lib/vxe-v-x-e-table/index.min.js +1 -1
  186. package/package.json +5 -4
  187. package/packages/grid/src/grid.ts +127 -65
  188. package/packages/locale/lang/en-US.ts +2 -1
  189. package/packages/locale/lang/es-ES.ts +2 -1
  190. package/packages/locale/lang/hu-HU.ts +2 -1
  191. package/packages/locale/lang/ja-JP.ts +2 -1
  192. package/packages/locale/lang/ko-KR.ts +2 -1
  193. package/packages/locale/lang/pt-BR.ts +2 -1
  194. package/packages/locale/lang/ru-RU.ts +2 -1
  195. package/packages/locale/lang/uk-UA.ts +2 -1
  196. package/packages/locale/lang/vi-VN.ts +2 -1
  197. package/packages/locale/lang/zh-CHT.ts +2 -1
  198. package/packages/locale/lang/zh-CN.ts +2 -1
  199. package/packages/table/module/custom/panel.ts +186 -175
  200. package/packages/table/module/edit/mixin.ts +32 -23
  201. package/packages/table/module/export/export-panel.ts +36 -4
  202. package/packages/table/module/export/import-panel.ts +29 -6
  203. package/packages/table/module/export/mixin.ts +11 -11
  204. package/packages/table/module/menu/mixin.ts +2 -2
  205. package/packages/table/module/validator/mixin.ts +4 -4
  206. package/packages/table/render/index.ts +20 -11
  207. package/packages/table/src/body.ts +1 -0
  208. package/packages/table/src/columnInfo.ts +3 -3
  209. package/packages/table/src/methods.ts +53 -42
  210. package/packages/table/src/props.ts +68 -15
  211. package/packages/table/src/table.ts +99 -54
  212. package/packages/table/src/util.ts +3 -2
  213. package/packages/toolbar/src/toolbar.ts +21 -7
  214. package/packages/ui/index.ts +3 -1
  215. package/styles/components/table.scss +82 -17
  216. package/types/all.d.ts +1 -0
  217. /package/es/{iconfont.1726453742001.ttf → iconfont.1728348263835.ttf} +0 -0
  218. /package/es/{iconfont.1726453742001.woff → iconfont.1728348263835.woff} +0 -0
  219. /package/es/{iconfont.1726453742001.woff2 → iconfont.1728348263835.woff2} +0 -0
  220. /package/lib/{iconfont.1726453742001.ttf → iconfont.1728348263835.ttf} +0 -0
  221. /package/lib/{iconfont.1726453742001.woff → iconfont.1728348263835.woff} +0 -0
  222. /package/lib/{iconfont.1726453742001.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) {
@@ -365,19 +373,19 @@ export default {
365
373
  return this.computeValidOpts
366
374
  },
367
375
  computeValidOpts () {
368
- return Object.assign({ message: 'default' }, getConfig().table.validConfig, this.validConfig)
376
+ return Object.assign({ message: 'default' }, XEUtils.clone(getConfig().table.validConfig, true), this.validConfig)
369
377
  },
370
378
  sXOpts () {
371
379
  return this.computeSXOpts
372
380
  },
373
381
  computeSXOpts () {
374
- return Object.assign({}, getConfig().table.scrollX, this.scrollX)
382
+ return Object.assign({}, XEUtils.clone(getConfig().table.scrollX, true), this.scrollX)
375
383
  },
376
384
  sYOpts () {
377
385
  return this.computeSYOpts
378
386
  },
379
387
  computeSYOpts () {
380
- return Object.assign({}, getConfig().table.scrollY, this.scrollY)
388
+ return Object.assign({}, XEUtils.clone(getConfig().table.scrollY, true), this.scrollY)
381
389
  },
382
390
  rowHeightMaps () {
383
391
  return {
@@ -391,49 +399,49 @@ export default {
391
399
  return this.computeColumnOpts
392
400
  },
393
401
  computeColumnOpts () {
394
- return Object.assign({}, getConfig().table.columnConfig, this.columnConfig)
402
+ return Object.assign({}, XEUtils.clone(getConfig().table.columnConfig, true), this.columnConfig)
395
403
  },
396
404
  rowOpts () {
397
405
  return this.computeRowOpts
398
406
  },
399
407
  computeRowOpts () {
400
- return Object.assign({}, getConfig().table.rowConfig, this.rowConfig)
408
+ return Object.assign({}, XEUtils.clone(getConfig().table.rowConfig, true), this.rowConfig)
401
409
  },
402
410
  resizeOpts () {
403
411
  return this.computeResizeOpts
404
412
  },
405
413
  computeResizeOpts () {
406
- return Object.assign({}, getConfig().table.resizeConfig, this.resizeConfig)
414
+ return Object.assign({}, XEUtils.clone(getConfig().table.resizeConfig, true), this.resizeConfig)
407
415
  },
408
416
  resizableOpts () {
409
417
  return this.computeResizableOpts
410
418
  },
411
419
  computeResizableOpts () {
412
- return Object.assign({}, getConfig().table.resizableConfig, this.resizableConfig)
420
+ return Object.assign({}, XEUtils.clone(getConfig().table.resizableConfig, true), this.resizableConfig)
413
421
  },
414
422
  seqOpts () {
415
423
  return this.computeSeqOpts
416
424
  },
417
425
  computeSeqOpts () {
418
- return Object.assign({ startIndex: 0 }, getConfig().table.seqConfig, this.seqConfig)
426
+ return Object.assign({ startIndex: 0 }, XEUtils.clone(getConfig().table.seqConfig, true), this.seqConfig)
419
427
  },
420
428
  radioOpts () {
421
429
  return this.computeRadioOpts
422
430
  },
423
431
  computeRadioOpts () {
424
- return Object.assign({}, getConfig().table.radioConfig, this.radioConfig)
432
+ return Object.assign({}, XEUtils.clone(getConfig().table.radioConfig, true), this.radioConfig)
425
433
  },
426
434
  checkboxOpts () {
427
435
  return this.computeCheckboxOpts
428
436
  },
429
437
  computeCheckboxOpts () {
430
- return Object.assign({}, getConfig().table.checkboxConfig, this.checkboxConfig)
438
+ return Object.assign({}, XEUtils.clone(getConfig().table.checkboxConfig, true), this.checkboxConfig)
431
439
  },
432
440
  tooltipOpts () {
433
441
  return this.computeTooltipOpts
434
442
  },
435
443
  computeTooltipOpts () {
436
- return Object.assign({}, getConfig().tooltip, getConfig().table.tooltipConfig, this.tooltipConfig)
444
+ return Object.assign({}, XEUtils.clone(getConfig().tooltip, true), XEUtils.clone(getConfig().table.tooltipConfig, true), this.tooltipConfig)
437
445
  },
438
446
  tipConfig () {
439
447
  return { ...this.tooltipOpts }
@@ -445,53 +453,49 @@ export default {
445
453
  return this.computeEditOpts
446
454
  },
447
455
  computeEditOpts () {
448
- return Object.assign({}, getConfig().table.editConfig, this.editConfig)
456
+ return Object.assign({}, XEUtils.clone(getConfig().table.editConfig, true), this.editConfig)
449
457
  },
450
458
  sortOpts () {
451
459
  return this.computeSortOpts
452
460
  },
453
461
  computeSortOpts () {
454
- return Object.assign({ orders: ['asc', 'desc', null] }, getConfig().table.sortConfig, this.sortConfig)
462
+ return Object.assign({ orders: ['asc', 'desc', null] }, XEUtils.clone(getConfig().table.sortConfig, true), this.sortConfig)
455
463
  },
456
464
  filterOpts () {
457
465
  return this.computeFilterOpts
458
466
  },
459
467
  computeFilterOpts () {
460
- return Object.assign({}, getConfig().table.filterConfig, this.filterConfig)
468
+ return Object.assign({}, XEUtils.clone(getConfig().table.filterConfig, true), this.filterConfig)
461
469
  },
462
470
  mouseOpts () {
463
471
  return this.computeMouseOpts
464
472
  },
465
473
  computeMouseOpts () {
466
- return Object.assign({}, getConfig().table.mouseConfig, this.mouseConfig)
474
+ return Object.assign({}, XEUtils.clone(getConfig().table.mouseConfig, true), this.mouseConfig)
467
475
  },
468
476
  areaOpts () {
469
477
  return this.computeAreaOpts
470
478
  },
471
479
  computeAreaOpts () {
472
- return Object.assign({}, getConfig().table.areaConfig, this.areaConfig)
480
+ return Object.assign({}, XEUtils.clone(getConfig().table.areaConfig, true), this.areaConfig)
473
481
  },
474
482
  keyboardOpts () {
475
483
  return this.computeKeyboardOpts
476
484
  },
477
485
  computeKeyboardOpts () {
478
- return Object.assign({}, getConfig().table.keyboardConfig, this.keyboardConfig)
486
+ return Object.assign({}, XEUtils.clone(getConfig().table.keyboardConfig, true), this.keyboardConfig)
479
487
  },
480
488
  clipOpts () {
481
489
  return this.computeClipOpts
482
490
  },
483
491
  computeClipOpts () {
484
- return Object.assign({}, getConfig().table.clipConfig, this.clipConfig)
492
+ return Object.assign({}, XEUtils.clone(getConfig().table.clipConfig, true), this.clipConfig)
485
493
  },
486
494
  fnrOpts () {
487
495
  return this.computeFNROpts
488
496
  },
489
497
  computeFNROpts () {
490
- return Object.assign({}, getConfig().table.fnrConfig, this.fnrConfig)
491
- },
492
- hasTip () {
493
- return true
494
- // return VXETable._tooltip
498
+ return Object.assign({}, XEUtils.clone(getConfig().table.fnrConfig, true), this.fnrConfig)
495
499
  },
496
500
  headerCtxMenu () {
497
501
  const headerOpts = this.ctxMenuOpts.header
@@ -521,49 +525,49 @@ export default {
521
525
  return this.computeMenuOpts
522
526
  },
523
527
  computeMenuOpts () {
524
- return Object.assign({}, getConfig().table.menuConfig, this.contextMenu, this.menuConfig)
528
+ return Object.assign({}, XEUtils.clone(getConfig().table.menuConfig, true), this.contextMenu, this.menuConfig)
525
529
  },
526
530
  exportOpts () {
527
531
  return this.computeExportOpts
528
532
  },
529
533
  computeExportOpts () {
530
- return Object.assign({}, getConfig().table.exportConfig, this.exportConfig)
534
+ return Object.assign({}, XEUtils.clone(getConfig().table.exportConfig, true), this.exportConfig)
531
535
  },
532
536
  importOpts () {
533
537
  return this.computeImportOpts
534
538
  },
535
539
  computeImportOpts () {
536
- return Object.assign({}, getConfig().table.importConfig, this.importConfig)
540
+ return Object.assign({}, XEUtils.clone(getConfig().table.importConfig, true), this.importConfig)
537
541
  },
538
542
  printOpts () {
539
543
  return this.computePrintOpts
540
544
  },
541
545
  computePrintOpts () {
542
- return Object.assign({}, getConfig().table.printConfig, this.printConfig)
546
+ return Object.assign({}, XEUtils.clone(getConfig().table.printConfig, true), this.printConfig)
543
547
  },
544
548
  expandOpts () {
545
549
  return this.computeExpandOpts
546
550
  },
547
551
  computeExpandOpts () {
548
- return Object.assign({}, getConfig().table.expandConfig, this.expandConfig)
552
+ return Object.assign({}, XEUtils.clone(getConfig().table.expandConfig, true), this.expandConfig)
549
553
  },
550
554
  treeOpts () {
551
555
  return this.computeTreeOpts
552
556
  },
553
557
  computeTreeOpts () {
554
- return Object.assign({}, getConfig().table.treeConfig, this.treeConfig)
558
+ return Object.assign({}, XEUtils.clone(getConfig().table.treeConfig, true), this.treeConfig)
555
559
  },
556
560
  emptyOpts () {
557
561
  return this.computeEmptyOpts
558
562
  },
559
563
  computeEmptyOpts () {
560
- return Object.assign({}, getConfig().table.emptyRender, this.emptyRender)
564
+ return Object.assign({}, XEUtils.clone(getConfig().table.emptyRender, true), this.emptyRender)
561
565
  },
562
566
  loadingOpts () {
563
567
  return this.computeLoadingOpts
564
568
  },
565
569
  computeLoadingOpts () {
566
- return Object.assign({}, getConfig().table.loadingConfig, this.loadingConfig)
570
+ return Object.assign({}, XEUtils.clone(getConfig().table.loadingConfig, true), this.loadingConfig)
567
571
  },
568
572
  cellOffsetWidth () {
569
573
  return this.border ? Math.max(2, Math.ceil(this.scrollbarWidth / this.tableColumn.length)) : 1
@@ -572,7 +576,7 @@ export default {
572
576
  return this.computeCustomOpts
573
577
  },
574
578
  computeCustomOpts () {
575
- return Object.assign({}, getConfig().table.customConfig, this.customConfig)
579
+ return Object.assign({}, XEUtils.clone(getConfig().table.customConfig, true), this.customConfig)
576
580
  },
577
581
  autoWidthColumnList () {
578
582
  const { tableColumn, visibleColumn } = this
@@ -625,6 +629,12 @@ export default {
625
629
  return true
626
630
  }
627
631
  return false
632
+ },
633
+ tabsResizeFlag () {
634
+ const $xeTable = this
635
+ const $xeTabs = $xeTable.$xeTabs
636
+
637
+ return $xeTabs ? $xeTabs.reactData.resizeFlag : null
628
638
  }
629
639
  } as any,
630
640
  watch: {
@@ -686,6 +696,9 @@ export default {
686
696
  })
687
697
  }
688
698
  },
699
+ tabsResizeFlag () {
700
+ this.handleGlobalResizeEvent()
701
+ },
689
702
  mergeCells (value: any) {
690
703
  this.clearMergeCells()
691
704
  this.$nextTick(() => this.setMergeCells(value))
@@ -745,7 +758,7 @@ export default {
745
758
  fullColumnFieldData: {}
746
759
  })
747
760
 
748
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
761
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
749
762
  if (this.rowId) {
750
763
  warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField'])
751
764
  }
@@ -795,7 +808,7 @@ export default {
795
808
  }
796
809
  }
797
810
 
798
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
811
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
799
812
  const customOpts = this.customOpts
800
813
  if (!this.id && this.customConfig && (customOpts.storage === true || (customOpts.storage && customOpts.storage.resizable) || (customOpts.storage && customOpts.storage.visible))) {
801
814
  errLog('vxe.error.reqProp', ['id'])
@@ -836,7 +849,7 @@ export default {
836
849
  }
837
850
 
838
851
  // v4 中只支持对象类型
839
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
852
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
840
853
  // 在 v3.0 中废弃 context-menu
841
854
  if (this.contextMenu) {
842
855
  warnLog('vxe.error.delProp', ['context-menu', 'menu-config'])
@@ -880,7 +893,7 @@ export default {
880
893
  }
881
894
 
882
895
  // 检查是否有安装需要的模块
883
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
896
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
884
897
  if (this.editConfig && !this._insert) {
885
898
  errLog('vxe.error.reqModule', ['Edit'])
886
899
  }
@@ -927,7 +940,10 @@ export default {
927
940
  this.preventEvent(null, 'created')
928
941
  },
929
942
  mounted () {
930
- 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') {
931
947
  const { $listeners } = this
932
948
  if (!this.menuConfig && ($listeners['menu-click'] || $listeners['cell-menu'] || $listeners['header-cell-menu'] || $listeners['footer-cell-menu'])) {
933
949
  warnLog('vxe.error.reqProp', ['menu-config'])
@@ -936,12 +952,34 @@ export default {
936
952
  warnLog('vxe.error.reqProp', ['tooltip-config'])
937
953
  }
938
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
+ }
939
977
  if (this.autoResize) {
940
978
  const handleWrapperResize = this.resizeOpts.refreshDelay ? XEUtils.throttle(() => this.recalculate(true), this.resizeOpts.refreshDelay, { leading: true, trailing: true }) : null
941
979
  const resizeObserver = globalResize.create(handleWrapperResize
942
980
  ? () => {
943
981
  if (this.autoResize) {
944
- requestAnimationFrame(handleWrapperResize)
982
+ handleWrapperResize()
945
983
  }
946
984
  }
947
985
  : () => {
@@ -983,6 +1021,10 @@ export default {
983
1021
  this.preventEvent(null, 'destroyed')
984
1022
  },
985
1023
  render (h: CreateElement) {
1024
+ // 使用已安装的组件,如果未安装则不渲染
1025
+ const VxeUILoadingComponent = VxeUI.getComponent<VxeLoadingComponent>('VxeLoading')
1026
+ const VxeUITooltipComponent = VxeUI.getComponent<VxeTooltipComponent>('VxeTooltip')
1027
+
986
1028
  const {
987
1029
  _e,
988
1030
  $scopedSlots,
@@ -1001,7 +1043,7 @@ export default {
1001
1043
  treeConfig,
1002
1044
  mouseConfig,
1003
1045
  mouseOpts,
1004
- vSize,
1046
+ computeSize,
1005
1047
  validOpts,
1006
1048
  showFooter,
1007
1049
  overflowX,
@@ -1021,7 +1063,6 @@ export default {
1021
1063
  ctxMenuStore,
1022
1064
  ctxMenuOpts,
1023
1065
  footerTableData,
1024
- hasTip,
1025
1066
  columnOpts,
1026
1067
  rowOpts,
1027
1068
  checkboxOpts,
@@ -1030,6 +1071,7 @@ export default {
1030
1071
  } = this
1031
1072
  const { leftList, rightList } = columnStore
1032
1073
  const currLoading = this._isLoading || loading
1074
+ const vSize = computeSize
1033
1075
  return h('div', {
1034
1076
  class: ['vxe-table', 'vxe-table--render-default', `tid_${tId}`, vSize ? `size--${vSize}` : '', `border--${tableBorder}`, {
1035
1077
  [`valid-msg--${validOpts.msgMode}`]: !!editRules,
@@ -1049,6 +1091,7 @@ export default {
1049
1091
  'is--fixed-left': leftList.length,
1050
1092
  'is--fixed-right': rightList.length,
1051
1093
  'is--animat': !!this.animat,
1094
+ 'is--padding': this.padding,
1052
1095
  'is--round': this.round,
1053
1096
  'is--stripe': !treeConfig && stripe,
1054
1097
  'is--loading': currLoading,
@@ -1162,14 +1205,16 @@ export default {
1162
1205
  /**
1163
1206
  * 加载中
1164
1207
  */
1165
- h('vxe-loading', {
1166
- class: 'vxe-table--loading',
1167
- props: {
1168
- value: currLoading,
1169
- icon: loadingOpts.icon,
1170
- text: loadingOpts.text
1171
- }
1172
- }, 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(),
1173
1218
  /**
1174
1219
  * 自定义列
1175
1220
  */
@@ -1230,8 +1275,8 @@ export default {
1230
1275
  /**
1231
1276
  * 通用提示
1232
1277
  */
1233
- hasTip
1234
- ? h('vxe-tooltip', {
1278
+ VxeUITooltipComponent
1279
+ ? h(VxeUITooltipComponent, {
1235
1280
  ref: 'commTip',
1236
1281
  props: {
1237
1282
  isArrow: false,
@@ -1242,8 +1287,8 @@ export default {
1242
1287
  /**
1243
1288
  * 工具提示
1244
1289
  */
1245
- hasTip
1246
- ? h('vxe-tooltip', {
1290
+ VxeUITooltipComponent
1291
+ ? h(VxeUITooltipComponent, {
1247
1292
  ref: 'tooltip',
1248
1293
  props: Object.assign({}, this.tipConfig, this.tooltipStore.currOpts)
1249
1294
  })
@@ -1251,8 +1296,8 @@ export default {
1251
1296
  /**
1252
1297
  * 校验提示
1253
1298
  */
1254
- hasTip && this.editRules && validOpts.showMessage && (validOpts.message === 'default' ? !height : validOpts.message === 'tooltip')
1255
- ? h('vxe-tooltip', {
1299
+ VxeUITooltipComponent && this.editRules && validOpts.showMessage && (validOpts.message === 'default' ? !height : validOpts.message === 'tooltip')
1300
+ ? h(VxeUITooltipComponent, {
1256
1301
  ref: 'validTip',
1257
1302
  class: [{
1258
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: {