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
@@ -119,6 +119,9 @@ export default {
119
119
  };
120
120
  },
121
121
  inject: {
122
+ $xeTabs: {
123
+ default: null
124
+ },
122
125
  $xeGrid: {
123
126
  default: null
124
127
  },
@@ -345,8 +348,7 @@ export default {
345
348
  _isLoading: false
346
349
  };
347
350
  },
348
- computed: {
349
- tableId() {
351
+ computed: Object.assign(Object.assign({}, {}), { tableId() {
350
352
  const { id } = this;
351
353
  if (id) {
352
354
  if (XEUtils.isFunction(id)) {
@@ -357,13 +359,22 @@ export default {
357
359
  return '';
358
360
  },
359
361
  validOpts() {
360
- return Object.assign({ message: 'default' }, getConfig().table.validConfig, this.validConfig);
362
+ return this.computeValidOpts;
363
+ },
364
+ computeValidOpts() {
365
+ return Object.assign({ message: 'default' }, XEUtils.clone(getConfig().table.validConfig, true), this.validConfig);
361
366
  },
362
367
  sXOpts() {
363
- return Object.assign({}, getConfig().table.scrollX, this.scrollX);
368
+ return this.computeSXOpts;
369
+ },
370
+ computeSXOpts() {
371
+ return Object.assign({}, XEUtils.clone(getConfig().table.scrollX, true), this.scrollX);
364
372
  },
365
373
  sYOpts() {
366
- return Object.assign({}, getConfig().table.scrollY, this.scrollY);
374
+ return this.computeSYOpts;
375
+ },
376
+ computeSYOpts() {
377
+ return Object.assign({}, XEUtils.clone(getConfig().table.scrollY, true), this.scrollY);
367
378
  },
368
379
  rowHeightMaps() {
369
380
  return {
@@ -374,28 +385,52 @@ export default {
374
385
  };
375
386
  },
376
387
  columnOpts() {
377
- return Object.assign({}, getConfig().table.columnConfig, this.columnConfig);
388
+ return this.computeColumnOpts;
389
+ },
390
+ computeColumnOpts() {
391
+ return Object.assign({}, XEUtils.clone(getConfig().table.columnConfig, true), this.columnConfig);
378
392
  },
379
393
  rowOpts() {
380
- return Object.assign({}, getConfig().table.rowConfig, this.rowConfig);
394
+ return this.computeRowOpts;
395
+ },
396
+ computeRowOpts() {
397
+ return Object.assign({}, XEUtils.clone(getConfig().table.rowConfig, true), this.rowConfig);
381
398
  },
382
399
  resizeOpts() {
383
- return Object.assign({}, getConfig().table.resizeConfig, this.resizeConfig);
400
+ return this.computeResizeOpts;
401
+ },
402
+ computeResizeOpts() {
403
+ return Object.assign({}, XEUtils.clone(getConfig().table.resizeConfig, true), this.resizeConfig);
384
404
  },
385
405
  resizableOpts() {
386
- return Object.assign({}, getConfig().table.resizableConfig, this.resizableConfig);
406
+ return this.computeResizableOpts;
407
+ },
408
+ computeResizableOpts() {
409
+ return Object.assign({}, XEUtils.clone(getConfig().table.resizableConfig, true), this.resizableConfig);
387
410
  },
388
411
  seqOpts() {
389
- return Object.assign({ startIndex: 0 }, getConfig().table.seqConfig, this.seqConfig);
412
+ return this.computeSeqOpts;
413
+ },
414
+ computeSeqOpts() {
415
+ return Object.assign({ startIndex: 0 }, XEUtils.clone(getConfig().table.seqConfig, true), this.seqConfig);
390
416
  },
391
417
  radioOpts() {
392
- return Object.assign({}, getConfig().table.radioConfig, this.radioConfig);
418
+ return this.computeRadioOpts;
419
+ },
420
+ computeRadioOpts() {
421
+ return Object.assign({}, XEUtils.clone(getConfig().table.radioConfig, true), this.radioConfig);
393
422
  },
394
423
  checkboxOpts() {
395
- return Object.assign({}, getConfig().table.checkboxConfig, this.checkboxConfig);
424
+ return this.computeCheckboxOpts;
425
+ },
426
+ computeCheckboxOpts() {
427
+ return Object.assign({}, XEUtils.clone(getConfig().table.checkboxConfig, true), this.checkboxConfig);
396
428
  },
397
429
  tooltipOpts() {
398
- return Object.assign({}, getConfig().tooltip, getConfig().table.tooltipConfig, this.tooltipConfig);
430
+ return this.computeTooltipOpts;
431
+ },
432
+ computeTooltipOpts() {
433
+ return Object.assign({}, XEUtils.clone(getConfig().tooltip, true), XEUtils.clone(getConfig().table.tooltipConfig, true), this.tooltipConfig);
399
434
  },
400
435
  tipConfig() {
401
436
  return Object.assign({}, this.tooltipOpts);
@@ -404,32 +439,52 @@ export default {
404
439
  return Object.assign({ isArrow: false }, this.tooltipOpts);
405
440
  },
406
441
  editOpts() {
407
- return Object.assign({}, getConfig().table.editConfig, this.editConfig);
442
+ return this.computeEditOpts;
443
+ },
444
+ computeEditOpts() {
445
+ return Object.assign({}, XEUtils.clone(getConfig().table.editConfig, true), this.editConfig);
408
446
  },
409
447
  sortOpts() {
410
- return Object.assign({ orders: ['asc', 'desc', null] }, getConfig().table.sortConfig, this.sortConfig);
448
+ return this.computeSortOpts;
449
+ },
450
+ computeSortOpts() {
451
+ return Object.assign({ orders: ['asc', 'desc', null] }, XEUtils.clone(getConfig().table.sortConfig, true), this.sortConfig);
411
452
  },
412
453
  filterOpts() {
413
- return Object.assign({}, getConfig().table.filterConfig, this.filterConfig);
454
+ return this.computeFilterOpts;
455
+ },
456
+ computeFilterOpts() {
457
+ return Object.assign({}, XEUtils.clone(getConfig().table.filterConfig, true), this.filterConfig);
414
458
  },
415
459
  mouseOpts() {
416
- return Object.assign({}, getConfig().table.mouseConfig, this.mouseConfig);
460
+ return this.computeMouseOpts;
461
+ },
462
+ computeMouseOpts() {
463
+ return Object.assign({}, XEUtils.clone(getConfig().table.mouseConfig, true), this.mouseConfig);
417
464
  },
418
465
  areaOpts() {
419
- return Object.assign({}, getConfig().table.areaConfig, this.areaConfig);
466
+ return this.computeAreaOpts;
467
+ },
468
+ computeAreaOpts() {
469
+ return Object.assign({}, XEUtils.clone(getConfig().table.areaConfig, true), this.areaConfig);
420
470
  },
421
471
  keyboardOpts() {
422
- return Object.assign({}, getConfig().table.keyboardConfig, this.keyboardConfig);
472
+ return this.computeKeyboardOpts;
473
+ },
474
+ computeKeyboardOpts() {
475
+ return Object.assign({}, XEUtils.clone(getConfig().table.keyboardConfig, true), this.keyboardConfig);
423
476
  },
424
477
  clipOpts() {
425
- return Object.assign({}, getConfig().table.clipConfig, this.clipConfig);
478
+ return this.computeClipOpts;
479
+ },
480
+ computeClipOpts() {
481
+ return Object.assign({}, XEUtils.clone(getConfig().table.clipConfig, true), this.clipConfig);
426
482
  },
427
483
  fnrOpts() {
428
- return Object.assign({}, getConfig().table.fnrConfig, this.fnrConfig);
484
+ return this.computeFNROpts;
429
485
  },
430
- hasTip() {
431
- return true;
432
- // return VXETable._tooltip
486
+ computeFNROpts() {
487
+ return Object.assign({}, XEUtils.clone(getConfig().table.fnrConfig, true), this.fnrConfig);
433
488
  },
434
489
  headerCtxMenu() {
435
490
  const headerOpts = this.ctxMenuOpts.header;
@@ -446,9 +501,6 @@ export default {
446
501
  isCtxMenu() {
447
502
  return !!((this.contextMenu || this.menuConfig) && isEnableConf(this.ctxMenuOpts) && (this.headerCtxMenu.length || this.bodyCtxMenu.length || this.footerCtxMenu.length));
448
503
  },
449
- ctxMenuOpts() {
450
- return Object.assign({}, getConfig().table.menuConfig, this.contextMenu, this.menuConfig);
451
- },
452
504
  ctxMenuList() {
453
505
  const rest = [];
454
506
  this.ctxMenuStore.list.forEach((list) => {
@@ -458,36 +510,63 @@ export default {
458
510
  });
459
511
  return rest;
460
512
  },
513
+ ctxMenuOpts() {
514
+ return this.computeMenuOpts;
515
+ },
516
+ computeMenuOpts() {
517
+ return Object.assign({}, XEUtils.clone(getConfig().table.menuConfig, true), this.contextMenu, this.menuConfig);
518
+ },
461
519
  exportOpts() {
462
- return Object.assign({}, getConfig().table.exportConfig, this.exportConfig);
520
+ return this.computeExportOpts;
521
+ },
522
+ computeExportOpts() {
523
+ return Object.assign({}, XEUtils.clone(getConfig().table.exportConfig, true), this.exportConfig);
463
524
  },
464
525
  importOpts() {
465
- return Object.assign({}, getConfig().table.importConfig, this.importConfig);
526
+ return this.computeImportOpts;
527
+ },
528
+ computeImportOpts() {
529
+ return Object.assign({}, XEUtils.clone(getConfig().table.importConfig, true), this.importConfig);
466
530
  },
467
531
  printOpts() {
468
- return Object.assign({}, getConfig().table.printConfig, this.printConfig);
532
+ return this.computePrintOpts;
533
+ },
534
+ computePrintOpts() {
535
+ return Object.assign({}, XEUtils.clone(getConfig().table.printConfig, true), this.printConfig);
469
536
  },
470
537
  expandOpts() {
471
- return Object.assign({}, getConfig().table.expandConfig, this.expandConfig);
538
+ return this.computeExpandOpts;
539
+ },
540
+ computeExpandOpts() {
541
+ return Object.assign({}, XEUtils.clone(getConfig().table.expandConfig, true), this.expandConfig);
472
542
  },
473
543
  treeOpts() {
474
- return Object.assign({}, getConfig().table.treeConfig, this.treeConfig);
544
+ return this.computeTreeOpts;
545
+ },
546
+ computeTreeOpts() {
547
+ return Object.assign({}, XEUtils.clone(getConfig().table.treeConfig, true), this.treeConfig);
475
548
  },
476
549
  emptyOpts() {
477
- return Object.assign({}, getConfig().table.emptyRender, this.emptyRender);
550
+ return this.computeEmptyOpts;
551
+ },
552
+ computeEmptyOpts() {
553
+ return Object.assign({}, XEUtils.clone(getConfig().table.emptyRender, true), this.emptyRender);
478
554
  },
479
555
  loadingOpts() {
480
- return Object.assign({}, getConfig().table.loadingConfig, this.loadingConfig);
556
+ return this.computeLoadingOpts;
557
+ },
558
+ computeLoadingOpts() {
559
+ return Object.assign({}, XEUtils.clone(getConfig().table.loadingConfig, true), this.loadingConfig);
481
560
  },
482
561
  cellOffsetWidth() {
483
562
  return this.border ? Math.max(2, Math.ceil(this.scrollbarWidth / this.tableColumn.length)) : 1;
484
563
  },
485
- computeCustomOpts() {
486
- return Object.assign({}, getConfig().table.customConfig, this.customConfig);
487
- },
488
564
  customOpts() {
489
565
  return this.computeCustomOpts;
490
566
  },
567
+ computeCustomOpts() {
568
+ return Object.assign({}, XEUtils.clone(getConfig().table.customConfig, true), this.customConfig);
569
+ },
491
570
  autoWidthColumnList() {
492
571
  const { tableColumn, visibleColumn } = this;
493
572
  return tableColumn.length || visibleColumn.length ? visibleColumn.filter((column) => column.width === 'auto' || column.minWidth === 'auto') : [];
@@ -539,8 +618,12 @@ export default {
539
618
  return true;
540
619
  }
541
620
  return false;
542
- }
543
- },
621
+ },
622
+ tabsResizeFlag() {
623
+ const $xeTable = this;
624
+ const $xeTabs = $xeTable.$xeTabs;
625
+ return $xeTabs ? $xeTabs.reactData.resizeFlag : null;
626
+ } }),
544
627
  watch: {
545
628
  data(value) {
546
629
  const { inited, initStatus } = this;
@@ -600,6 +683,9 @@ export default {
600
683
  });
601
684
  }
602
685
  },
686
+ tabsResizeFlag() {
687
+ this.handleGlobalResizeEvent();
688
+ },
603
689
  mergeCells(value) {
604
690
  this.clearMergeCells();
605
691
  this.$nextTick(() => this.setMergeCells(value));
@@ -658,7 +744,7 @@ export default {
658
744
  fullColumnIdData: {},
659
745
  fullColumnFieldData: {}
660
746
  });
661
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
747
+ if (process.env.NODE_ENV === 'development') {
662
748
  if (this.rowId) {
663
749
  warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField']);
664
750
  }
@@ -707,7 +793,7 @@ export default {
707
793
  warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(exportOpts._typeMaps), type)).join(',') || XEUtils.keys(exportOpts._typeMaps).join(',')]);
708
794
  }
709
795
  }
710
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
796
+ if (process.env.NODE_ENV === 'development') {
711
797
  const customOpts = this.customOpts;
712
798
  if (!this.id && this.customConfig && (customOpts.storage === true || (customOpts.storage && customOpts.storage.resizable) || (customOpts.storage && customOpts.storage.visible))) {
713
799
  errLog('vxe.error.reqProp', ['id']);
@@ -747,7 +833,7 @@ export default {
747
833
  }
748
834
  }
749
835
  // v4 中只支持对象类型
750
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
836
+ if (process.env.NODE_ENV === 'development') {
751
837
  // 在 v3.0 中废弃 context-menu
752
838
  if (this.contextMenu) {
753
839
  warnLog('vxe.error.delProp', ['context-menu', 'menu-config']);
@@ -790,7 +876,7 @@ export default {
790
876
  }
791
877
  }
792
878
  // 检查是否有安装需要的模块
793
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
879
+ if (process.env.NODE_ENV === 'development') {
794
880
  if (this.editConfig && !this._insert) {
795
881
  errLog('vxe.error.reqModule', ['Edit']);
796
882
  }
@@ -836,7 +922,9 @@ export default {
836
922
  this.preventEvent(null, 'created');
837
923
  },
838
924
  mounted() {
839
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
925
+ const $xeTable = this;
926
+ const props = $xeTable;
927
+ if (process.env.NODE_ENV === 'development') {
840
928
  const { $listeners } = this;
841
929
  if (!this.menuConfig && ($listeners['menu-click'] || $listeners['cell-menu'] || $listeners['header-cell-menu'] || $listeners['footer-cell-menu'])) {
842
930
  warnLog('vxe.error.reqProp', ['menu-config']);
@@ -845,12 +933,32 @@ export default {
845
933
  warnLog('vxe.error.reqProp', ['tooltip-config']);
846
934
  }
847
935
  }
936
+ if (process.env.NODE_ENV === 'development') {
937
+ // 使用已安装的组件,如果未安装则不渲染
938
+ const VxeUILoadingComponent = VxeUI.getComponent('VxeLoading');
939
+ const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip');
940
+ $xeTable.$nextTick(() => {
941
+ if (props.loading) {
942
+ if (!VxeUILoadingComponent) {
943
+ errLog('vxe.error.reqComp', ['vxe-loading']);
944
+ }
945
+ }
946
+ if ((props.showOverflow === true || props.showOverflow === 'tooltip') ||
947
+ (props.showHeaderOverflow === true || props.showHeaderOverflow === 'tooltip') ||
948
+ (props.showFooterOverflow === true || props.showFooterOverflow === 'tooltip') ||
949
+ props.tooltipConfig || props.editRules) {
950
+ if (!VxeUITooltipComponent) {
951
+ errLog('vxe.error.reqComp', ['vxe-tooltip']);
952
+ }
953
+ }
954
+ });
955
+ }
848
956
  if (this.autoResize) {
849
957
  const handleWrapperResize = this.resizeOpts.refreshDelay ? XEUtils.throttle(() => this.recalculate(true), this.resizeOpts.refreshDelay, { leading: true, trailing: true }) : null;
850
958
  const resizeObserver = globalResize.create(handleWrapperResize
851
959
  ? () => {
852
960
  if (this.autoResize) {
853
- requestAnimationFrame(handleWrapperResize);
961
+ handleWrapperResize();
854
962
  }
855
963
  }
856
964
  : () => {
@@ -892,9 +1000,13 @@ export default {
892
1000
  this.preventEvent(null, 'destroyed');
893
1001
  },
894
1002
  render(h) {
895
- const { _e, $scopedSlots, tId, isCalcColumn, tableData, tableColumn, tableGroupColumn, isGroup, loading, stripe, showHeader, height, tableBorder, treeOpts, treeConfig, mouseConfig, mouseOpts, vSize, validOpts, showFooter, overflowX, overflowY, scrollXLoad, scrollYLoad, scrollbarHeight, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, validTipOpts, initStore, columnStore, filterStore, customStore, ctxMenuStore, ctxMenuOpts, footerTableData, hasTip, columnOpts, rowOpts, checkboxOpts, loadingOpts, editRules } = this;
1003
+ // 使用已安装的组件,如果未安装则不渲染
1004
+ const VxeUILoadingComponent = VxeUI.getComponent('VxeLoading');
1005
+ const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip');
1006
+ const { _e, $scopedSlots, tId, isCalcColumn, tableData, tableColumn, tableGroupColumn, isGroup, loading, stripe, showHeader, height, tableBorder, treeOpts, treeConfig, mouseConfig, mouseOpts, computeSize, validOpts, showFooter, overflowX, overflowY, scrollXLoad, scrollYLoad, scrollbarHeight, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, validTipOpts, initStore, columnStore, filterStore, customStore, ctxMenuStore, ctxMenuOpts, footerTableData, columnOpts, rowOpts, checkboxOpts, loadingOpts, editRules } = this;
896
1007
  const { leftList, rightList } = columnStore;
897
1008
  const currLoading = this._isLoading || loading;
1009
+ const vSize = computeSize;
898
1010
  return h('div', {
899
1011
  class: ['vxe-table', 'vxe-table--render-default', `tid_${tId}`, vSize ? `size--${vSize}` : '', `border--${tableBorder}`, {
900
1012
  [`valid-msg--${validOpts.msgMode}`]: !!editRules,
@@ -914,6 +1026,7 @@ export default {
914
1026
  'is--fixed-left': leftList.length,
915
1027
  'is--fixed-right': rightList.length,
916
1028
  'is--animat': !!this.animat,
1029
+ 'is--padding': this.padding,
917
1030
  'is--round': this.round,
918
1031
  'is--stripe': !treeConfig && stripe,
919
1032
  'is--loading': currLoading,
@@ -1027,14 +1140,16 @@ export default {
1027
1140
  /**
1028
1141
  * 加载中
1029
1142
  */
1030
- h('vxe-loading', {
1031
- class: 'vxe-table--loading',
1032
- props: {
1033
- value: currLoading,
1034
- icon: loadingOpts.icon,
1035
- text: loadingOpts.text
1036
- }
1037
- }, this.callSlot($scopedSlots.loading, {}, h)),
1143
+ VxeUILoadingComponent
1144
+ ? h(VxeUILoadingComponent, {
1145
+ class: 'vxe-table--loading',
1146
+ props: {
1147
+ value: currLoading,
1148
+ icon: loadingOpts.icon,
1149
+ text: loadingOpts.text
1150
+ }
1151
+ }, this.callSlot($scopedSlots.loading, {}, h))
1152
+ : _e(),
1038
1153
  /**
1039
1154
  * 自定义列
1040
1155
  */
@@ -1095,8 +1210,8 @@ export default {
1095
1210
  /**
1096
1211
  * 通用提示
1097
1212
  */
1098
- hasTip
1099
- ? h('vxe-tooltip', {
1213
+ VxeUITooltipComponent
1214
+ ? h(VxeUITooltipComponent, {
1100
1215
  ref: 'commTip',
1101
1216
  props: {
1102
1217
  isArrow: false,
@@ -1107,8 +1222,8 @@ export default {
1107
1222
  /**
1108
1223
  * 工具提示
1109
1224
  */
1110
- hasTip
1111
- ? h('vxe-tooltip', {
1225
+ VxeUITooltipComponent
1226
+ ? h(VxeUITooltipComponent, {
1112
1227
  ref: 'tooltip',
1113
1228
  props: Object.assign({}, this.tipConfig, this.tooltipStore.currOpts)
1114
1229
  })
@@ -1116,8 +1231,8 @@ export default {
1116
1231
  /**
1117
1232
  * 校验提示
1118
1233
  */
1119
- hasTip && this.editRules && validOpts.showMessage && (validOpts.message === 'default' ? !height : validOpts.message === 'tooltip')
1120
- ? h('vxe-tooltip', {
1234
+ VxeUITooltipComponent && this.editRules && validOpts.showMessage && (validOpts.message === 'default' ? !height : validOpts.message === 'tooltip')
1235
+ ? h(VxeUITooltipComponent, {
1121
1236
  ref: 'validTip',
1122
1237
  class: [{
1123
1238
  'old-cell-valid': editRules && getConfig().cellVaildMode === 'obsolete'
@@ -135,7 +135,7 @@ export function assembleColumn(_vm) {
135
135
  const groupConfig = $xecolumn ? $xecolumn.columnConfig : null;
136
136
  columnConfig.slots = _vm.$scopedSlots;
137
137
  if (groupConfig) {
138
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
138
+ if (process.env.NODE_ENV === 'development') {
139
139
  if ($xecolumn.$options._componentTag === 'vxe-table-column') {
140
140
  errLog('vxe.error.groupTag', [`<vxe-table-colgroup title=${$xecolumn.title} ...>`, `<vxe-table-column title=${$xecolumn.title} ...>`]);
141
141
  }
@@ -251,7 +251,8 @@ function countTreeExpand(prevRow, params) {
251
251
  return count;
252
252
  }
253
253
  export function getOffsetSize($xetable) {
254
- return lineOffsetSizes[$xetable.vSize] || 0;
254
+ const vSize = $xetable.computeSize;
255
+ return lineOffsetSizes[vSize] || 0;
255
256
  }
256
257
  export function calcTreeLine(params, items, rIndex) {
257
258
  const { $table } = params;