vxe-table 4.19.20 → 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 (161) hide show
  1. package/dist/all.esm.js +71 -36
  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 +8 -0
  7. package/es/locale/lang/de-DE.js +8 -0
  8. package/es/locale/lang/en-US.js +9 -1
  9. package/es/locale/lang/es-ES.js +8 -0
  10. package/es/locale/lang/fr-FR.js +8 -0
  11. package/es/locale/lang/hu-HU.js +8 -0
  12. package/es/locale/lang/hy-AM.js +8 -0
  13. package/es/locale/lang/id-ID.js +8 -0
  14. package/es/locale/lang/it-IT.js +8 -0
  15. package/es/locale/lang/ja-JP.js +8 -0
  16. package/es/locale/lang/ko-KR.js +8 -0
  17. package/es/locale/lang/ms-MY.js +8 -0
  18. package/es/locale/lang/nb-NO.js +8 -0
  19. package/es/locale/lang/pt-BR.js +8 -0
  20. package/es/locale/lang/ru-RU.js +8 -0
  21. package/es/locale/lang/th-TH.js +8 -0
  22. package/es/locale/lang/ug-CN.js +8 -0
  23. package/es/locale/lang/uk-UA.js +8 -0
  24. package/es/locale/lang/uz-UZ.js +8 -0
  25. package/es/locale/lang/vi-VN.js +8 -0
  26. package/es/locale/lang/zh-CHT.js +8 -0
  27. package/es/locale/lang/zh-CN.js +8 -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/module/menu/hook.js +11 -7
  34. package/es/table/src/emits.js +5 -0
  35. package/es/table/src/table.js +7 -1
  36. package/es/ui/index.js +1 -1
  37. package/es/ui/src/log.js +1 -1
  38. package/lib/index.css +1 -1
  39. package/lib/index.min.css +1 -1
  40. package/lib/index.umd.js +64 -39
  41. package/lib/index.umd.min.js +1 -1
  42. package/lib/locale/lang/ar-EG.js +8 -0
  43. package/lib/locale/lang/ar-EG.min.js +1 -1
  44. package/lib/locale/lang/ar-EG.umd.js +8 -0
  45. package/lib/locale/lang/de-DE.js +8 -0
  46. package/lib/locale/lang/de-DE.min.js +1 -1
  47. package/lib/locale/lang/de-DE.umd.js +8 -0
  48. package/lib/locale/lang/en-US.js +9 -1
  49. package/lib/locale/lang/en-US.min.js +1 -1
  50. package/lib/locale/lang/en-US.umd.js +9 -1
  51. package/lib/locale/lang/es-ES.js +8 -0
  52. package/lib/locale/lang/es-ES.min.js +1 -1
  53. package/lib/locale/lang/es-ES.umd.js +8 -0
  54. package/lib/locale/lang/fr-FR.js +8 -0
  55. package/lib/locale/lang/fr-FR.min.js +1 -1
  56. package/lib/locale/lang/fr-FR.umd.js +8 -0
  57. package/lib/locale/lang/hu-HU.js +8 -0
  58. package/lib/locale/lang/hu-HU.min.js +1 -1
  59. package/lib/locale/lang/hu-HU.umd.js +8 -0
  60. package/lib/locale/lang/hy-AM.js +8 -0
  61. package/lib/locale/lang/hy-AM.min.js +1 -1
  62. package/lib/locale/lang/hy-AM.umd.js +8 -0
  63. package/lib/locale/lang/id-ID.js +8 -0
  64. package/lib/locale/lang/id-ID.min.js +1 -1
  65. package/lib/locale/lang/id-ID.umd.js +8 -0
  66. package/lib/locale/lang/it-IT.js +8 -0
  67. package/lib/locale/lang/it-IT.min.js +1 -1
  68. package/lib/locale/lang/it-IT.umd.js +8 -0
  69. package/lib/locale/lang/ja-JP.js +8 -0
  70. package/lib/locale/lang/ja-JP.min.js +1 -1
  71. package/lib/locale/lang/ja-JP.umd.js +8 -0
  72. package/lib/locale/lang/ko-KR.js +8 -0
  73. package/lib/locale/lang/ko-KR.min.js +1 -1
  74. package/lib/locale/lang/ko-KR.umd.js +8 -0
  75. package/lib/locale/lang/ms-MY.js +8 -0
  76. package/lib/locale/lang/ms-MY.min.js +1 -1
  77. package/lib/locale/lang/ms-MY.umd.js +8 -0
  78. package/lib/locale/lang/nb-NO.js +8 -0
  79. package/lib/locale/lang/nb-NO.min.js +1 -1
  80. package/lib/locale/lang/nb-NO.umd.js +8 -0
  81. package/lib/locale/lang/pt-BR.js +8 -0
  82. package/lib/locale/lang/pt-BR.min.js +1 -1
  83. package/lib/locale/lang/pt-BR.umd.js +8 -0
  84. package/lib/locale/lang/ru-RU.js +8 -0
  85. package/lib/locale/lang/ru-RU.min.js +1 -1
  86. package/lib/locale/lang/ru-RU.umd.js +8 -0
  87. package/lib/locale/lang/th-TH.js +8 -0
  88. package/lib/locale/lang/th-TH.min.js +1 -1
  89. package/lib/locale/lang/th-TH.umd.js +8 -0
  90. package/lib/locale/lang/ug-CN.js +8 -0
  91. package/lib/locale/lang/ug-CN.min.js +1 -1
  92. package/lib/locale/lang/ug-CN.umd.js +8 -0
  93. package/lib/locale/lang/uk-UA.js +8 -0
  94. package/lib/locale/lang/uk-UA.min.js +1 -1
  95. package/lib/locale/lang/uk-UA.umd.js +8 -0
  96. package/lib/locale/lang/uz-UZ.js +8 -0
  97. package/lib/locale/lang/uz-UZ.min.js +1 -1
  98. package/lib/locale/lang/uz-UZ.umd.js +8 -0
  99. package/lib/locale/lang/vi-VN.js +8 -0
  100. package/lib/locale/lang/vi-VN.min.js +1 -1
  101. package/lib/locale/lang/vi-VN.umd.js +8 -0
  102. package/lib/locale/lang/zh-CHT.js +8 -0
  103. package/lib/locale/lang/zh-CHT.min.js +1 -1
  104. package/lib/locale/lang/zh-CHT.umd.js +8 -0
  105. package/lib/locale/lang/zh-CN.js +8 -0
  106. package/lib/locale/lang/zh-CN.min.js +1 -1
  107. package/lib/locale/lang/zh-CN.umd.js +8 -0
  108. package/lib/style.css +1 -1
  109. package/lib/style.min.css +1 -1
  110. package/lib/table/module/custom/hook.js +32 -26
  111. package/lib/table/module/custom/hook.min.js +1 -1
  112. package/lib/table/module/custom/panel.js +7 -0
  113. package/lib/table/module/custom/panel.min.js +1 -1
  114. package/lib/table/module/edit/hook.js +0 -1
  115. package/lib/table/module/edit/hook.min.js +1 -1
  116. package/lib/table/module/menu/hook.js +10 -5
  117. package/lib/table/module/menu/hook.min.js +1 -1
  118. package/lib/table/src/emits.js +1 -1
  119. package/lib/table/src/emits.min.js +1 -1
  120. package/lib/table/src/table.js +4 -4
  121. package/lib/table/src/table.min.js +1 -1
  122. package/lib/ui/index.js +1 -1
  123. package/lib/ui/index.min.js +1 -1
  124. package/lib/ui/src/log.js +1 -1
  125. package/lib/ui/src/log.min.js +1 -1
  126. package/package.json +2 -2
  127. package/packages/locale/lang/ar-EG.ts +8 -0
  128. package/packages/locale/lang/de-DE.ts +8 -0
  129. package/packages/locale/lang/en-US.ts +9 -1
  130. package/packages/locale/lang/es-ES.ts +8 -0
  131. package/packages/locale/lang/fr-FR.ts +8 -0
  132. package/packages/locale/lang/hu-HU.ts +8 -0
  133. package/packages/locale/lang/hy-AM.ts +8 -0
  134. package/packages/locale/lang/id-ID.ts +8 -0
  135. package/packages/locale/lang/it-IT.ts +8 -0
  136. package/packages/locale/lang/ja-JP.ts +8 -0
  137. package/packages/locale/lang/ko-KR.ts +8 -0
  138. package/packages/locale/lang/ms-MY.ts +8 -0
  139. package/packages/locale/lang/nb-NO.ts +8 -0
  140. package/packages/locale/lang/pt-BR.ts +8 -0
  141. package/packages/locale/lang/ru-RU.ts +8 -0
  142. package/packages/locale/lang/th-TH.ts +8 -0
  143. package/packages/locale/lang/ug-CN.ts +8 -0
  144. package/packages/locale/lang/uk-UA.ts +8 -0
  145. package/packages/locale/lang/uz-UZ.ts +8 -0
  146. package/packages/locale/lang/vi-VN.ts +8 -0
  147. package/packages/locale/lang/zh-CHT.ts +8 -0
  148. package/packages/locale/lang/zh-CN.ts +8 -0
  149. package/packages/table/module/custom/hook.ts +31 -25
  150. package/packages/table/module/custom/panel.ts +7 -0
  151. package/packages/table/module/edit/hook.ts +0 -1
  152. package/packages/table/module/menu/hook.ts +12 -7
  153. package/packages/table/src/emits.ts +5 -0
  154. package/packages/table/src/table.ts +6 -1
  155. package/styles/theme/base.scss +2 -1
  156. /package/es/{iconfont.1782439515438.ttf → iconfont.1782890314097.ttf} +0 -0
  157. /package/es/{iconfont.1782439515438.woff → iconfont.1782890314097.woff} +0 -0
  158. /package/es/{iconfont.1782439515438.woff2 → iconfont.1782890314097.woff2} +0 -0
  159. /package/lib/{iconfont.1782439515438.ttf → iconfont.1782890314097.ttf} +0 -0
  160. /package/lib/{iconfont.1782439515438.woff → iconfont.1782890314097.woff} +0 -0
  161. /package/lib/{iconfont.1782439515438.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.20";
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.20"}`;
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) {
@@ -8856,7 +8868,7 @@ hooks$6.add('tableMenuModule', {
8856
8868
  const isContentMenu = computeIsContentMenu.value;
8857
8869
  const menuOpts = computeMenuOpts.value;
8858
8870
  const config = menuOpts[type];
8859
- const { zIndex, transfer, visibleMethod } = menuOpts;
8871
+ const { zIndex, transfer, width, visibleMethod } = menuOpts;
8860
8872
  if (config) {
8861
8873
  const { options, disabled } = config;
8862
8874
  if (disabled) {
@@ -8882,17 +8894,21 @@ hooks$6.add('tableMenuModule', {
8882
8894
  }
8883
8895
  const handleVisible = () => {
8884
8896
  internalData._currMenuParams = params;
8897
+ const ctxStyle = {
8898
+ zIndex: zIndex || internalData.tZindex,
8899
+ top: `${top}px`,
8900
+ left: `${left}px`
8901
+ };
8902
+ if (width) {
8903
+ ctxStyle['--vxe-ui-table-menu-item-width'] = toCssUnit(width);
8904
+ }
8885
8905
  Object.assign(ctxMenuStore, {
8886
8906
  visible: true,
8887
8907
  list: options,
8888
8908
  selected: null,
8889
8909
  selectChild: null,
8890
8910
  showChild: false,
8891
- style: {
8892
- zIndex: zIndex || internalData.tZindex,
8893
- top: `${top}px`,
8894
- left: `${left}px`
8895
- }
8911
+ style: ctxStyle
8896
8912
  });
8897
8913
  nextTick(() => {
8898
8914
  const tableMenu = refTableMenu.value;
@@ -9691,7 +9707,6 @@ hooks$5.add('tableEditModule', {
9691
9707
  return handleInsertRowAt(records, targetRowOrRowid, true);
9692
9708
  },
9693
9709
  insertChild(records, parentRowOrParentId) {
9694
- window.aa = internalData;
9695
9710
  return handleInsertChildRowAt(records, parentRowOrParentId, null);
9696
9711
  },
9697
9712
  insertChildAt(records, parentRowOrParentId, targetRow) {
@@ -13260,39 +13275,41 @@ VxeUI.hooks.add('tableCustomModule', {
13260
13275
  }
13261
13276
  return openCustom();
13262
13277
  };
13263
- const saveCustom = () => {
13278
+ const saveCustom = (isDirectly) => {
13264
13279
  const { customColumnList, aggHandleFields, rowGroupList } = reactData;
13265
13280
  const customOpts = computeCustomOpts.value;
13266
13281
  const { allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues } = customOpts;
13267
- XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
13268
- if (parentColumn) {
13269
- // 更新子列信息
13270
- column.fixed = parentColumn.fixed;
13271
- }
13272
- else {
13273
- if (allowSort) {
13274
- const sortIndex = index + 1;
13275
- column.renderSortNumber = sortIndex;
13282
+ if (!isDirectly) {
13283
+ XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
13284
+ if (parentColumn) {
13285
+ // 更新子列信息
13286
+ column.fixed = parentColumn.fixed;
13276
13287
  }
13277
- if (allowFixed) {
13278
- 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
+ }
13279
13296
  }
13280
- }
13281
- if (allowResizable) {
13282
- if (column.renderVisible && (!column.children || !column.children.length)) {
13283
- if (column.renderResizeWidth !== column.renderWidth) {
13284
- column.resizeWidth = column.renderResizeWidth;
13285
- 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
+ }
13286
13303
  }
13287
13304
  }
13288
- }
13289
- if (allowVisible) {
13290
- column.visible = column.renderVisible;
13291
- }
13292
- if (allowGroup && allowValues) {
13293
- column.aggFunc = column.renderAggFn;
13294
- }
13295
- });
13305
+ if (allowVisible) {
13306
+ column.visible = column.renderVisible;
13307
+ }
13308
+ if (allowGroup && allowValues) {
13309
+ column.aggFunc = column.renderAggFn;
13310
+ }
13311
+ });
13312
+ }
13296
13313
  reactData.isCustomStatus = true;
13297
13314
  if (allowGroup && !!$xeTable.handlePivotTableAggData) {
13298
13315
  if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
@@ -13474,11 +13491,13 @@ VxeUI.hooks.add('tableCustomModule', {
13474
13491
  if (customStore.visible) {
13475
13492
  closeCustom();
13476
13493
  emitCustomEvent('close', evnt);
13494
+ $xeTable.dispatchEvent('custom-close', {}, evnt);
13477
13495
  }
13478
13496
  else {
13479
13497
  customStore.btnEl = evnt.target;
13480
13498
  openCustom();
13481
13499
  emitCustomEvent('open', evnt);
13500
+ $xeTable.dispatchEvent('custom-open', {}, evnt);
13482
13501
  }
13483
13502
  },
13484
13503
  customOpenEvent(evnt) {
@@ -13489,6 +13508,7 @@ VxeUI.hooks.add('tableCustomModule', {
13489
13508
  customStore.btnEl = evnt.target;
13490
13509
  $xeTable.openCustom();
13491
13510
  $xeTable.emitCustomEvent('open', evnt);
13511
+ $xeTable.dispatchEvent('custom-open', {}, evnt);
13492
13512
  }
13493
13513
  },
13494
13514
  customCloseEvent(evnt) {
@@ -13498,6 +13518,7 @@ VxeUI.hooks.add('tableCustomModule', {
13498
13518
  customStore.activeBtn = false;
13499
13519
  $xeTable.closeCustom();
13500
13520
  $xeTable.emitCustomEvent('close', evnt);
13521
+ $xeTable.dispatchEvent('custom-close', {}, evnt);
13501
13522
  }
13502
13523
  },
13503
13524
  handleUpdateCustomColumn,
@@ -24060,12 +24081,16 @@ var VxeTableComponent = defineVxeComponent({
24060
24081
  // 如果为 null 使用默认逻辑
24061
24082
  if (XEUtils.eqNull(customContent)) {
24062
24083
  isShow = isOver;
24084
+ content = cellText;
24063
24085
  }
24064
24086
  else if (customContent !== '' && customContent !== false) {
24065
24087
  // 如果为 '' | false 则不显示
24066
24088
  isShow = true;
24089
+ content = customContent;
24090
+ }
24091
+ else {
24092
+ content = cellText;
24067
24093
  }
24068
- content = cellText;
24069
24094
  }
24070
24095
  if (isShow && content) {
24071
24096
  const tipContent = formatText(content);
@@ -26232,6 +26257,7 @@ var VxeTableComponent = defineVxeComponent({
26232
26257
  if (evnt.dataTransfer) {
26233
26258
  evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
26234
26259
  }
26260
+ $xeTable.closeTooltip();
26235
26261
  },
26236
26262
  handleRowDragSwapEvent(evnt, isSyncRow, dragRow, prevDragRow, prevDragPos, prevDragToChild) {
26237
26263
  const { treeConfig, dragConfig } = props;
@@ -26894,6 +26920,7 @@ var VxeTableComponent = defineVxeComponent({
26894
26920
  if (evnt.dataTransfer) {
26895
26921
  evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
26896
26922
  }
26923
+ $xeTable.closeTooltip();
26897
26924
  },
26898
26925
  handleColDragSwapColumn() {
26899
26926
  handleUpdateColumn();
@@ -32009,6 +32036,10 @@ var zhCN = {
32009
32036
  overSizeErr: '已超出最大可选数量 {0} 个,超出部分将被忽略!',
32010
32037
  searchEmpty: '未匹配到数据!'
32011
32038
  },
32039
+ list: {
32040
+ allChecked: '全选',
32041
+ dragTip: '移动:{0}'
32042
+ },
32012
32043
  tree: {
32013
32044
  searchEmpty: '未匹配到数据!',
32014
32045
  dragTip: '移动:{0}'
@@ -32179,6 +32210,10 @@ var zhCN = {
32179
32210
  fixedRight: '冻结在右侧',
32180
32211
  cancelFixed: '取消冻结列'
32181
32212
  },
32213
+ iconPicker: {
32214
+ search: '搜索',
32215
+ emptyText: '暂无数据'
32216
+ },
32182
32217
  datePicker: {
32183
32218
  yearTitle: '{0} 年'
32184
32219
  },