vxe-table 4.19.21 → 4.19.22

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 (157) hide show
  1. package/dist/all.esm.js +55 -30
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/index.css +1 -1
  5. package/es/index.min.css +1 -1
  6. package/es/locale/lang/ar-EG.js +4 -0
  7. package/es/locale/lang/de-DE.js +4 -0
  8. package/es/locale/lang/en-US.js +4 -0
  9. package/es/locale/lang/es-ES.js +4 -0
  10. package/es/locale/lang/fr-FR.js +4 -0
  11. package/es/locale/lang/hu-HU.js +4 -0
  12. package/es/locale/lang/hy-AM.js +4 -0
  13. package/es/locale/lang/id-ID.js +4 -0
  14. package/es/locale/lang/it-IT.js +4 -0
  15. package/es/locale/lang/ja-JP.js +4 -0
  16. package/es/locale/lang/ko-KR.js +4 -0
  17. package/es/locale/lang/ms-MY.js +4 -0
  18. package/es/locale/lang/nb-NO.js +4 -0
  19. package/es/locale/lang/pt-BR.js +4 -0
  20. package/es/locale/lang/ru-RU.js +4 -0
  21. package/es/locale/lang/th-TH.js +4 -0
  22. package/es/locale/lang/ug-CN.js +4 -0
  23. package/es/locale/lang/uk-UA.js +4 -0
  24. package/es/locale/lang/uz-UZ.js +4 -0
  25. package/es/locale/lang/vi-VN.js +4 -0
  26. package/es/locale/lang/zh-CHT.js +4 -0
  27. package/es/locale/lang/zh-CN.js +4 -0
  28. package/es/style.css +1 -1
  29. package/es/style.min.css +1 -1
  30. package/es/table/module/custom/hook.js +32 -26
  31. package/es/table/module/custom/panel.js +7 -0
  32. package/es/table/module/edit/hook.js +0 -1
  33. package/es/table/src/emits.js +5 -0
  34. package/es/table/src/table.js +5 -1
  35. package/es/ui/index.js +1 -1
  36. package/es/ui/src/log.js +1 -1
  37. package/lib/index.css +1 -1
  38. package/lib/index.min.css +1 -1
  39. package/lib/index.umd.js +48 -32
  40. package/lib/index.umd.min.js +1 -1
  41. package/lib/locale/lang/ar-EG.js +4 -0
  42. package/lib/locale/lang/ar-EG.min.js +1 -1
  43. package/lib/locale/lang/ar-EG.umd.js +4 -0
  44. package/lib/locale/lang/de-DE.js +4 -0
  45. package/lib/locale/lang/de-DE.min.js +1 -1
  46. package/lib/locale/lang/de-DE.umd.js +4 -0
  47. package/lib/locale/lang/en-US.js +4 -0
  48. package/lib/locale/lang/en-US.min.js +1 -1
  49. package/lib/locale/lang/en-US.umd.js +4 -0
  50. package/lib/locale/lang/es-ES.js +4 -0
  51. package/lib/locale/lang/es-ES.min.js +1 -1
  52. package/lib/locale/lang/es-ES.umd.js +4 -0
  53. package/lib/locale/lang/fr-FR.js +4 -0
  54. package/lib/locale/lang/fr-FR.min.js +1 -1
  55. package/lib/locale/lang/fr-FR.umd.js +4 -0
  56. package/lib/locale/lang/hu-HU.js +4 -0
  57. package/lib/locale/lang/hu-HU.min.js +1 -1
  58. package/lib/locale/lang/hu-HU.umd.js +4 -0
  59. package/lib/locale/lang/hy-AM.js +4 -0
  60. package/lib/locale/lang/hy-AM.min.js +1 -1
  61. package/lib/locale/lang/hy-AM.umd.js +4 -0
  62. package/lib/locale/lang/id-ID.js +4 -0
  63. package/lib/locale/lang/id-ID.min.js +1 -1
  64. package/lib/locale/lang/id-ID.umd.js +4 -0
  65. package/lib/locale/lang/it-IT.js +4 -0
  66. package/lib/locale/lang/it-IT.min.js +1 -1
  67. package/lib/locale/lang/it-IT.umd.js +4 -0
  68. package/lib/locale/lang/ja-JP.js +4 -0
  69. package/lib/locale/lang/ja-JP.min.js +1 -1
  70. package/lib/locale/lang/ja-JP.umd.js +4 -0
  71. package/lib/locale/lang/ko-KR.js +4 -0
  72. package/lib/locale/lang/ko-KR.min.js +1 -1
  73. package/lib/locale/lang/ko-KR.umd.js +4 -0
  74. package/lib/locale/lang/ms-MY.js +4 -0
  75. package/lib/locale/lang/ms-MY.min.js +1 -1
  76. package/lib/locale/lang/ms-MY.umd.js +4 -0
  77. package/lib/locale/lang/nb-NO.js +4 -0
  78. package/lib/locale/lang/nb-NO.min.js +1 -1
  79. package/lib/locale/lang/nb-NO.umd.js +4 -0
  80. package/lib/locale/lang/pt-BR.js +4 -0
  81. package/lib/locale/lang/pt-BR.min.js +1 -1
  82. package/lib/locale/lang/pt-BR.umd.js +4 -0
  83. package/lib/locale/lang/ru-RU.js +4 -0
  84. package/lib/locale/lang/ru-RU.min.js +1 -1
  85. package/lib/locale/lang/ru-RU.umd.js +4 -0
  86. package/lib/locale/lang/th-TH.js +4 -0
  87. package/lib/locale/lang/th-TH.min.js +1 -1
  88. package/lib/locale/lang/th-TH.umd.js +4 -0
  89. package/lib/locale/lang/ug-CN.js +4 -0
  90. package/lib/locale/lang/ug-CN.min.js +1 -1
  91. package/lib/locale/lang/ug-CN.umd.js +4 -0
  92. package/lib/locale/lang/uk-UA.js +4 -0
  93. package/lib/locale/lang/uk-UA.min.js +1 -1
  94. package/lib/locale/lang/uk-UA.umd.js +4 -0
  95. package/lib/locale/lang/uz-UZ.js +4 -0
  96. package/lib/locale/lang/uz-UZ.min.js +1 -1
  97. package/lib/locale/lang/uz-UZ.umd.js +4 -0
  98. package/lib/locale/lang/vi-VN.js +4 -0
  99. package/lib/locale/lang/vi-VN.min.js +1 -1
  100. package/lib/locale/lang/vi-VN.umd.js +4 -0
  101. package/lib/locale/lang/zh-CHT.js +4 -0
  102. package/lib/locale/lang/zh-CHT.min.js +1 -1
  103. package/lib/locale/lang/zh-CHT.umd.js +4 -0
  104. package/lib/locale/lang/zh-CN.js +4 -0
  105. package/lib/locale/lang/zh-CN.min.js +1 -1
  106. package/lib/locale/lang/zh-CN.umd.js +4 -0
  107. package/lib/style.css +1 -1
  108. package/lib/style.min.css +1 -1
  109. package/lib/table/module/custom/hook.js +32 -26
  110. package/lib/table/module/custom/hook.min.js +1 -1
  111. package/lib/table/module/custom/panel.js +7 -0
  112. package/lib/table/module/custom/panel.min.js +1 -1
  113. package/lib/table/module/edit/hook.js +0 -1
  114. package/lib/table/module/edit/hook.min.js +1 -1
  115. package/lib/table/src/emits.js +1 -1
  116. package/lib/table/src/emits.min.js +1 -1
  117. package/lib/table/src/table.js +2 -2
  118. package/lib/table/src/table.min.js +1 -1
  119. package/lib/ui/index.js +1 -1
  120. package/lib/ui/index.min.js +1 -1
  121. package/lib/ui/src/log.js +1 -1
  122. package/lib/ui/src/log.min.js +1 -1
  123. package/package.json +2 -2
  124. package/packages/locale/lang/ar-EG.ts +4 -0
  125. package/packages/locale/lang/de-DE.ts +4 -0
  126. package/packages/locale/lang/en-US.ts +4 -0
  127. package/packages/locale/lang/es-ES.ts +4 -0
  128. package/packages/locale/lang/fr-FR.ts +4 -0
  129. package/packages/locale/lang/hu-HU.ts +4 -0
  130. package/packages/locale/lang/hy-AM.ts +4 -0
  131. package/packages/locale/lang/id-ID.ts +4 -0
  132. package/packages/locale/lang/it-IT.ts +4 -0
  133. package/packages/locale/lang/ja-JP.ts +4 -0
  134. package/packages/locale/lang/ko-KR.ts +4 -0
  135. package/packages/locale/lang/ms-MY.ts +4 -0
  136. package/packages/locale/lang/nb-NO.ts +4 -0
  137. package/packages/locale/lang/pt-BR.ts +4 -0
  138. package/packages/locale/lang/ru-RU.ts +4 -0
  139. package/packages/locale/lang/th-TH.ts +4 -0
  140. package/packages/locale/lang/ug-CN.ts +4 -0
  141. package/packages/locale/lang/uk-UA.ts +4 -0
  142. package/packages/locale/lang/uz-UZ.ts +4 -0
  143. package/packages/locale/lang/vi-VN.ts +4 -0
  144. package/packages/locale/lang/zh-CHT.ts +4 -0
  145. package/packages/locale/lang/zh-CN.ts +4 -0
  146. package/packages/table/module/custom/hook.ts +31 -25
  147. package/packages/table/module/custom/panel.ts +7 -0
  148. package/packages/table/module/edit/hook.ts +0 -1
  149. package/packages/table/src/emits.ts +5 -0
  150. package/packages/table/src/table.ts +4 -1
  151. package/styles/theme/base.scss +2 -1
  152. /package/es/{iconfont.1782656047498.ttf → iconfont.1782890314097.ttf} +0 -0
  153. /package/es/{iconfont.1782656047498.woff → iconfont.1782890314097.woff} +0 -0
  154. /package/es/{iconfont.1782656047498.woff2 → iconfont.1782890314097.woff2} +0 -0
  155. /package/lib/{iconfont.1782656047498.ttf → iconfont.1782890314097.ttf} +0 -0
  156. /package/lib/{iconfont.1782656047498.woff → iconfont.1782890314097.woff} +0 -0
  157. /package/lib/{iconfont.1782656047498.woff2 → iconfont.1782890314097.woff2} +0 -0
package/dist/all.esm.js CHANGED
@@ -44,7 +44,7 @@ function eqEmptyValue(cellValue) {
44
44
  return cellValue === '' || XEUtils.eqNull(cellValue);
45
45
  }
46
46
 
47
- const version = "4.19.21";
47
+ const version = "4.19.22";
48
48
  VxeUI.version = version;
49
49
  VxeUI.tableVersion = version;
50
50
  VxeUI.setConfig({
@@ -743,7 +743,7 @@ function wheelScrollTopTo(diffNum, cb) {
743
743
  }
744
744
 
745
745
  const { log } = VxeUI;
746
- const tableVersion = `table v${"4.19.21"}`;
746
+ const tableVersion = `table v${"4.19.22"}`;
747
747
  function createComponentLog(name) {
748
748
  const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
749
749
  const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
@@ -3876,6 +3876,11 @@ const tableEmits = [
3876
3876
  'scroll',
3877
3877
  'scroll-boundary',
3878
3878
  'custom',
3879
+ 'custom-open',
3880
+ 'custom-close',
3881
+ 'custom-cancel',
3882
+ 'custom-reset',
3883
+ 'custom-confirm',
3879
3884
  'custom-visible-change',
3880
3885
  'custom-visible-all',
3881
3886
  'custom-fixed-change',
@@ -5755,23 +5760,30 @@ var TableCustomPanelComponent = defineVxeComponent({
5755
5760
  $xeTable.saveCustom();
5756
5761
  $xeTable.closeCustom();
5757
5762
  $xeTable.emitCustomEvent('confirm', $event);
5763
+ $xeTable.dispatchEvent('custom-confirm', {}, $event);
5758
5764
  $xeTable.emitCustomEvent('close', $event);
5765
+ $xeTable.dispatchEvent('custom-close', {}, $event);
5759
5766
  };
5760
5767
  const cancelCloseEvent = ({ $event }) => {
5761
5768
  $xeTable.closeCustom();
5762
5769
  $xeTable.emitCustomEvent('close', $event);
5770
+ $xeTable.dispatchEvent('custom-close', {}, $event);
5763
5771
  };
5764
5772
  const cancelCustomEvent = ({ $event }) => {
5765
5773
  $xeTable.cancelCustom();
5766
5774
  $xeTable.closeCustom();
5767
5775
  $xeTable.emitCustomEvent('cancel', $event);
5776
+ $xeTable.dispatchEvent('custom-cancel', {}, $event);
5768
5777
  $xeTable.emitCustomEvent('close', $event);
5778
+ $xeTable.dispatchEvent('custom-close', {}, $event);
5769
5779
  };
5770
5780
  const handleResetCustomEvent = (evnt) => {
5771
5781
  $xeTable.resetCustom(true);
5772
5782
  $xeTable.closeCustom();
5773
5783
  $xeTable.emitCustomEvent('reset', evnt);
5784
+ $xeTable.dispatchEvent('custom-reset', {}, evnt);
5774
5785
  $xeTable.emitCustomEvent('close', evnt);
5786
+ $xeTable.dispatchEvent('custom-close', {}, evnt);
5775
5787
  };
5776
5788
  const resetCustomEvent = ({ $event }) => {
5777
5789
  if (VxeUI.modal) {
@@ -9695,7 +9707,6 @@ hooks$5.add('tableEditModule', {
9695
9707
  return handleInsertRowAt(records, targetRowOrRowid, true);
9696
9708
  },
9697
9709
  insertChild(records, parentRowOrParentId) {
9698
- window.aa = internalData;
9699
9710
  return handleInsertChildRowAt(records, parentRowOrParentId, null);
9700
9711
  },
9701
9712
  insertChildAt(records, parentRowOrParentId, targetRow) {
@@ -13264,39 +13275,41 @@ VxeUI.hooks.add('tableCustomModule', {
13264
13275
  }
13265
13276
  return openCustom();
13266
13277
  };
13267
- const saveCustom = () => {
13278
+ const saveCustom = (isDirectly) => {
13268
13279
  const { customColumnList, aggHandleFields, rowGroupList } = reactData;
13269
13280
  const customOpts = computeCustomOpts.value;
13270
13281
  const { allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues } = customOpts;
13271
- XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
13272
- if (parentColumn) {
13273
- // 更新子列信息
13274
- column.fixed = parentColumn.fixed;
13275
- }
13276
- else {
13277
- if (allowSort) {
13278
- const sortIndex = index + 1;
13279
- column.renderSortNumber = sortIndex;
13282
+ if (!isDirectly) {
13283
+ XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
13284
+ if (parentColumn) {
13285
+ // 更新子列信息
13286
+ column.fixed = parentColumn.fixed;
13280
13287
  }
13281
- if (allowFixed) {
13282
- column.fixed = column.renderFixed;
13288
+ else {
13289
+ if (allowSort) {
13290
+ const sortIndex = index + 1;
13291
+ column.renderSortNumber = sortIndex;
13292
+ }
13293
+ if (allowFixed) {
13294
+ column.fixed = column.renderFixed;
13295
+ }
13283
13296
  }
13284
- }
13285
- if (allowResizable) {
13286
- if (column.renderVisible && (!column.children || !column.children.length)) {
13287
- if (column.renderResizeWidth !== column.renderWidth) {
13288
- column.resizeWidth = column.renderResizeWidth;
13289
- column.renderWidth = column.renderResizeWidth;
13297
+ if (allowResizable) {
13298
+ if (column.renderVisible && (!column.children || !column.children.length)) {
13299
+ if (column.renderResizeWidth !== column.renderWidth) {
13300
+ column.resizeWidth = column.renderResizeWidth;
13301
+ column.renderWidth = column.renderResizeWidth;
13302
+ }
13290
13303
  }
13291
13304
  }
13292
- }
13293
- if (allowVisible) {
13294
- column.visible = column.renderVisible;
13295
- }
13296
- if (allowGroup && allowValues) {
13297
- column.aggFunc = column.renderAggFn;
13298
- }
13299
- });
13305
+ if (allowVisible) {
13306
+ column.visible = column.renderVisible;
13307
+ }
13308
+ if (allowGroup && allowValues) {
13309
+ column.aggFunc = column.renderAggFn;
13310
+ }
13311
+ });
13312
+ }
13300
13313
  reactData.isCustomStatus = true;
13301
13314
  if (allowGroup && !!$xeTable.handlePivotTableAggData) {
13302
13315
  if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
@@ -13478,11 +13491,13 @@ VxeUI.hooks.add('tableCustomModule', {
13478
13491
  if (customStore.visible) {
13479
13492
  closeCustom();
13480
13493
  emitCustomEvent('close', evnt);
13494
+ $xeTable.dispatchEvent('custom-close', {}, evnt);
13481
13495
  }
13482
13496
  else {
13483
13497
  customStore.btnEl = evnt.target;
13484
13498
  openCustom();
13485
13499
  emitCustomEvent('open', evnt);
13500
+ $xeTable.dispatchEvent('custom-open', {}, evnt);
13486
13501
  }
13487
13502
  },
13488
13503
  customOpenEvent(evnt) {
@@ -13493,6 +13508,7 @@ VxeUI.hooks.add('tableCustomModule', {
13493
13508
  customStore.btnEl = evnt.target;
13494
13509
  $xeTable.openCustom();
13495
13510
  $xeTable.emitCustomEvent('open', evnt);
13511
+ $xeTable.dispatchEvent('custom-open', {}, evnt);
13496
13512
  }
13497
13513
  },
13498
13514
  customCloseEvent(evnt) {
@@ -13502,6 +13518,7 @@ VxeUI.hooks.add('tableCustomModule', {
13502
13518
  customStore.activeBtn = false;
13503
13519
  $xeTable.closeCustom();
13504
13520
  $xeTable.emitCustomEvent('close', evnt);
13521
+ $xeTable.dispatchEvent('custom-close', {}, evnt);
13505
13522
  }
13506
13523
  },
13507
13524
  handleUpdateCustomColumn,
@@ -24064,12 +24081,16 @@ var VxeTableComponent = defineVxeComponent({
24064
24081
  // 如果为 null 使用默认逻辑
24065
24082
  if (XEUtils.eqNull(customContent)) {
24066
24083
  isShow = isOver;
24084
+ content = cellText;
24067
24085
  }
24068
24086
  else if (customContent !== '' && customContent !== false) {
24069
24087
  // 如果为 '' | false 则不显示
24070
24088
  isShow = true;
24089
+ content = customContent;
24090
+ }
24091
+ else {
24092
+ content = cellText;
24071
24093
  }
24072
- content = cellText;
24073
24094
  }
24074
24095
  if (isShow && content) {
24075
24096
  const tipContent = formatText(content);
@@ -32189,6 +32210,10 @@ var zhCN = {
32189
32210
  fixedRight: '冻结在右侧',
32190
32211
  cancelFixed: '取消冻结列'
32191
32212
  },
32213
+ iconPicker: {
32214
+ search: '搜索',
32215
+ emptyText: '暂无数据'
32216
+ },
32192
32217
  datePicker: {
32193
32218
  yearTitle: '{0} 年'
32194
32219
  },