vxe-table 3.21.21 → 3.21.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 (150) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/locale/lang/ar-EG.js +4 -0
  4. package/es/locale/lang/de-DE.js +4 -0
  5. package/es/locale/lang/en-US.js +4 -0
  6. package/es/locale/lang/es-ES.js +4 -0
  7. package/es/locale/lang/fr-FR.js +4 -0
  8. package/es/locale/lang/hu-HU.js +4 -0
  9. package/es/locale/lang/hy-AM.js +4 -0
  10. package/es/locale/lang/id-ID.js +4 -0
  11. package/es/locale/lang/it-IT.js +4 -0
  12. package/es/locale/lang/ja-JP.js +4 -0
  13. package/es/locale/lang/ko-KR.js +4 -0
  14. package/es/locale/lang/ms-MY.js +4 -0
  15. package/es/locale/lang/nb-NO.js +4 -0
  16. package/es/locale/lang/pt-BR.js +4 -0
  17. package/es/locale/lang/ru-RU.js +4 -0
  18. package/es/locale/lang/th-TH.js +4 -0
  19. package/es/locale/lang/ug-CN.js +4 -0
  20. package/es/locale/lang/uk-UA.js +4 -0
  21. package/es/locale/lang/uz-UZ.js +4 -0
  22. package/es/locale/lang/vi-VN.js +4 -0
  23. package/es/locale/lang/zh-CHT.js +4 -0
  24. package/es/locale/lang/zh-CN.js +4 -0
  25. package/es/style.css +1 -1
  26. package/es/style.min.css +1 -1
  27. package/es/table/module/custom/mixin.js +32 -26
  28. package/es/table/module/custom/panel.js +7 -0
  29. package/es/table/module/edit/mixin.js +12 -6
  30. package/es/table/src/methods.js +5 -1
  31. package/es/ui/index.js +1 -1
  32. package/es/ui/src/log.js +1 -1
  33. package/lib/index.css +1 -1
  34. package/lib/index.min.css +1 -1
  35. package/lib/index.umd.js +59 -36
  36. package/lib/index.umd.min.js +1 -1
  37. package/lib/locale/lang/ar-EG.js +4 -0
  38. package/lib/locale/lang/ar-EG.min.js +1 -1
  39. package/lib/locale/lang/ar-EG.umd.js +4 -0
  40. package/lib/locale/lang/de-DE.js +4 -0
  41. package/lib/locale/lang/de-DE.min.js +1 -1
  42. package/lib/locale/lang/de-DE.umd.js +4 -0
  43. package/lib/locale/lang/en-US.js +4 -0
  44. package/lib/locale/lang/en-US.min.js +1 -1
  45. package/lib/locale/lang/en-US.umd.js +4 -0
  46. package/lib/locale/lang/es-ES.js +4 -0
  47. package/lib/locale/lang/es-ES.min.js +1 -1
  48. package/lib/locale/lang/es-ES.umd.js +4 -0
  49. package/lib/locale/lang/fr-FR.js +4 -0
  50. package/lib/locale/lang/fr-FR.min.js +1 -1
  51. package/lib/locale/lang/fr-FR.umd.js +4 -0
  52. package/lib/locale/lang/hu-HU.js +4 -0
  53. package/lib/locale/lang/hu-HU.min.js +1 -1
  54. package/lib/locale/lang/hu-HU.umd.js +4 -0
  55. package/lib/locale/lang/hy-AM.js +4 -0
  56. package/lib/locale/lang/hy-AM.min.js +1 -1
  57. package/lib/locale/lang/hy-AM.umd.js +4 -0
  58. package/lib/locale/lang/id-ID.js +4 -0
  59. package/lib/locale/lang/id-ID.min.js +1 -1
  60. package/lib/locale/lang/id-ID.umd.js +4 -0
  61. package/lib/locale/lang/it-IT.js +4 -0
  62. package/lib/locale/lang/it-IT.min.js +1 -1
  63. package/lib/locale/lang/it-IT.umd.js +4 -0
  64. package/lib/locale/lang/ja-JP.js +4 -0
  65. package/lib/locale/lang/ja-JP.min.js +1 -1
  66. package/lib/locale/lang/ja-JP.umd.js +4 -0
  67. package/lib/locale/lang/ko-KR.js +4 -0
  68. package/lib/locale/lang/ko-KR.min.js +1 -1
  69. package/lib/locale/lang/ko-KR.umd.js +4 -0
  70. package/lib/locale/lang/ms-MY.js +4 -0
  71. package/lib/locale/lang/ms-MY.min.js +1 -1
  72. package/lib/locale/lang/ms-MY.umd.js +4 -0
  73. package/lib/locale/lang/nb-NO.js +4 -0
  74. package/lib/locale/lang/nb-NO.min.js +1 -1
  75. package/lib/locale/lang/nb-NO.umd.js +4 -0
  76. package/lib/locale/lang/pt-BR.js +4 -0
  77. package/lib/locale/lang/pt-BR.min.js +1 -1
  78. package/lib/locale/lang/pt-BR.umd.js +4 -0
  79. package/lib/locale/lang/ru-RU.js +4 -0
  80. package/lib/locale/lang/ru-RU.min.js +1 -1
  81. package/lib/locale/lang/ru-RU.umd.js +4 -0
  82. package/lib/locale/lang/th-TH.js +4 -0
  83. package/lib/locale/lang/th-TH.min.js +1 -1
  84. package/lib/locale/lang/th-TH.umd.js +4 -0
  85. package/lib/locale/lang/ug-CN.js +4 -0
  86. package/lib/locale/lang/ug-CN.min.js +1 -1
  87. package/lib/locale/lang/ug-CN.umd.js +4 -0
  88. package/lib/locale/lang/uk-UA.js +4 -0
  89. package/lib/locale/lang/uk-UA.min.js +1 -1
  90. package/lib/locale/lang/uk-UA.umd.js +4 -0
  91. package/lib/locale/lang/uz-UZ.js +4 -0
  92. package/lib/locale/lang/uz-UZ.min.js +1 -1
  93. package/lib/locale/lang/uz-UZ.umd.js +4 -0
  94. package/lib/locale/lang/vi-VN.js +4 -0
  95. package/lib/locale/lang/vi-VN.min.js +1 -1
  96. package/lib/locale/lang/vi-VN.umd.js +4 -0
  97. package/lib/locale/lang/zh-CHT.js +4 -0
  98. package/lib/locale/lang/zh-CHT.min.js +1 -1
  99. package/lib/locale/lang/zh-CHT.umd.js +4 -0
  100. package/lib/locale/lang/zh-CN.js +4 -0
  101. package/lib/locale/lang/zh-CN.min.js +1 -1
  102. package/lib/locale/lang/zh-CN.umd.js +4 -0
  103. package/lib/style.css +1 -1
  104. package/lib/style.min.css +1 -1
  105. package/lib/table/module/custom/mixin.js +32 -26
  106. package/lib/table/module/custom/mixin.min.js +1 -1
  107. package/lib/table/module/custom/panel.js +7 -0
  108. package/lib/table/module/custom/panel.min.js +1 -1
  109. package/lib/table/module/edit/mixin.js +12 -6
  110. package/lib/table/src/methods.js +2 -2
  111. package/lib/table/src/methods.min.js +1 -1
  112. package/lib/ui/index.js +1 -1
  113. package/lib/ui/index.min.js +1 -1
  114. package/lib/ui/src/log.js +1 -1
  115. package/lib/ui/src/log.min.js +1 -1
  116. package/package.json +2 -2
  117. package/packages/locale/lang/ar-EG.ts +4 -0
  118. package/packages/locale/lang/de-DE.ts +4 -0
  119. package/packages/locale/lang/en-US.ts +4 -0
  120. package/packages/locale/lang/es-ES.ts +4 -0
  121. package/packages/locale/lang/fr-FR.ts +4 -0
  122. package/packages/locale/lang/hu-HU.ts +4 -0
  123. package/packages/locale/lang/hy-AM.ts +4 -0
  124. package/packages/locale/lang/id-ID.ts +4 -0
  125. package/packages/locale/lang/it-IT.ts +4 -0
  126. package/packages/locale/lang/ja-JP.ts +4 -0
  127. package/packages/locale/lang/ko-KR.ts +4 -0
  128. package/packages/locale/lang/ms-MY.ts +4 -0
  129. package/packages/locale/lang/nb-NO.ts +4 -0
  130. package/packages/locale/lang/pt-BR.ts +4 -0
  131. package/packages/locale/lang/ru-RU.ts +4 -0
  132. package/packages/locale/lang/th-TH.ts +4 -0
  133. package/packages/locale/lang/ug-CN.ts +4 -0
  134. package/packages/locale/lang/uk-UA.ts +4 -0
  135. package/packages/locale/lang/uz-UZ.ts +4 -0
  136. package/packages/locale/lang/vi-VN.ts +4 -0
  137. package/packages/locale/lang/zh-CHT.ts +4 -0
  138. package/packages/locale/lang/zh-CN.ts +4 -0
  139. package/packages/table/module/custom/mixin.ts +31 -25
  140. package/packages/table/module/custom/panel.ts +7 -0
  141. package/packages/table/module/edit/mixin.ts +18 -6
  142. package/packages/table/src/methods.ts +4 -1
  143. package/packages/table/src/table.ts +6 -6
  144. package/styles/theme/base.scss +2 -1
  145. /package/es/{iconfont.1782656027274.ttf → iconfont.1782890276645.ttf} +0 -0
  146. /package/es/{iconfont.1782656027274.woff → iconfont.1782890276645.woff} +0 -0
  147. /package/es/{iconfont.1782656027274.woff2 → iconfont.1782890276645.woff2} +0 -0
  148. /package/lib/{iconfont.1782656027274.ttf → iconfont.1782890276645.ttf} +0 -0
  149. /package/lib/{iconfont.1782656027274.woff → iconfont.1782890276645.woff} +0 -0
  150. /package/lib/{iconfont.1782656027274.woff2 → iconfont.1782890276645.woff2} +0 -0
@@ -150,42 +150,44 @@ export default {
150
150
  }
151
151
  return $xeTable.openCustom();
152
152
  },
153
- _saveCustom() {
153
+ _saveCustom(isDirectly) {
154
154
  const $xeTable = this;
155
155
  const reactData = $xeTable;
156
156
  const internalData = $xeTable;
157
157
  const { customColumnList, aggHandleFields, rowGroupList } = reactData;
158
158
  const customOpts = $xeTable.computeCustomOpts;
159
159
  const { allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues } = customOpts;
160
- XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
161
- if (parentColumn) {
162
- // 更新子列信息
163
- column.fixed = parentColumn.fixed;
164
- }
165
- else {
166
- if (allowSort) {
167
- const sortIndex = index + 1;
168
- column.renderSortNumber = sortIndex;
160
+ if (!isDirectly) {
161
+ XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
162
+ if (parentColumn) {
163
+ // 更新子列信息
164
+ column.fixed = parentColumn.fixed;
169
165
  }
170
- if (allowFixed) {
171
- column.fixed = column.renderFixed;
166
+ else {
167
+ if (allowSort) {
168
+ const sortIndex = index + 1;
169
+ column.renderSortNumber = sortIndex;
170
+ }
171
+ if (allowFixed) {
172
+ column.fixed = column.renderFixed;
173
+ }
172
174
  }
173
- }
174
- if (allowResizable) {
175
- if (column.renderVisible && (!column.children || !column.children.length)) {
176
- if (column.renderResizeWidth !== column.renderWidth) {
177
- column.resizeWidth = column.renderResizeWidth;
178
- column.renderWidth = column.renderResizeWidth;
175
+ if (allowResizable) {
176
+ if (column.renderVisible && (!column.children || !column.children.length)) {
177
+ if (column.renderResizeWidth !== column.renderWidth) {
178
+ column.resizeWidth = column.renderResizeWidth;
179
+ column.renderWidth = column.renderResizeWidth;
180
+ }
179
181
  }
180
182
  }
181
- }
182
- if (allowVisible) {
183
- column.visible = column.renderVisible;
184
- }
185
- if (allowGroup && allowValues) {
186
- column.aggFunc = column.renderAggFn;
187
- }
188
- });
183
+ if (allowVisible) {
184
+ column.visible = column.renderVisible;
185
+ }
186
+ if (allowGroup && allowValues) {
187
+ column.aggFunc = column.renderAggFn;
188
+ }
189
+ });
190
+ }
189
191
  reactData.isCustomStatus = true;
190
192
  if (allowGroup && allowValues && !!$xeTable.handlePivotTableAggData) {
191
193
  if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
@@ -365,11 +367,13 @@ export default {
365
367
  if (customStore.visible) {
366
368
  $xeTable.closeCustom();
367
369
  emitCustomEvent($xeTable, 'close', evnt);
370
+ $xeTable.dispatchEvent('custom-close', {}, evnt);
368
371
  }
369
372
  else {
370
373
  customStore.btnEl = evnt.target;
371
374
  $xeTable.openCustom();
372
375
  emitCustomEvent($xeTable, 'open', evnt);
376
+ $xeTable.dispatchEvent('custom-open', {}, evnt);
373
377
  }
374
378
  },
375
379
  customOpenEvent(evnt) {
@@ -381,6 +385,7 @@ export default {
381
385
  customStore.btnEl = evnt.target;
382
386
  $xeTable.openCustom();
383
387
  emitCustomEvent($xeTable, 'open', evnt);
388
+ $xeTable.dispatchEvent('custom-open', {}, evnt);
384
389
  }
385
390
  },
386
391
  customCloseEvent(evnt) {
@@ -391,6 +396,7 @@ export default {
391
396
  customStore.activeBtn = false;
392
397
  $xeTable.closeCustom();
393
398
  emitCustomEvent($xeTable, 'close', evnt);
399
+ $xeTable.dispatchEvent('custom-close', {}, evnt);
394
400
  }
395
401
  },
396
402
  handleUpdateCustomColumn() {
@@ -159,13 +159,16 @@ export default {
159
159
  $xeTable.saveCustom();
160
160
  $xeTable.closeCustom();
161
161
  $xeTable.emitCustomEvent('confirm', $event);
162
+ $xeTable.dispatchEvent('custom-confirm', {}, $event);
162
163
  $xeTable.emitCustomEvent('close', $event);
164
+ $xeTable.dispatchEvent('custom-close', {}, $event);
163
165
  },
164
166
  cancelCloseEvent({ $event }) {
165
167
  const $xeTableCustomPanel = this;
166
168
  const $xeTable = $xeTableCustomPanel.$xeTable;
167
169
  $xeTable.closeCustom();
168
170
  $xeTable.emitCustomEvent('close', $event);
171
+ $xeTable.dispatchEvent('custom-close', {}, $event);
169
172
  },
170
173
  cancelCustomEvent({ $event }) {
171
174
  const $xeTableCustomPanel = this;
@@ -173,7 +176,9 @@ export default {
173
176
  $xeTable.cancelCustom();
174
177
  $xeTable.closeCustom();
175
178
  $xeTable.emitCustomEvent('cancel', $event);
179
+ $xeTable.dispatchEvent('custom-cancel', {}, $event);
176
180
  $xeTable.emitCustomEvent('close', $event);
181
+ $xeTable.dispatchEvent('custom-close', {}, $event);
177
182
  },
178
183
  handleResetCustomEvent(evnt) {
179
184
  const $xeTableCustomPanel = this;
@@ -181,7 +186,9 @@ export default {
181
186
  $xeTable.resetCustom(true);
182
187
  $xeTable.closeCustom();
183
188
  $xeTable.emitCustomEvent('reset', evnt);
189
+ $xeTable.dispatchEvent('custom-reset', {}, evnt);
184
190
  $xeTable.emitCustomEvent('close', evnt);
191
+ $xeTable.dispatchEvent('custom-close', {}, evnt);
185
192
  },
186
193
  resetCustomEvent(evnt) {
187
194
  if (VxeUI.modal) {
@@ -528,7 +528,8 @@ export default {
528
528
  * @param {*} records
529
529
  */
530
530
  _insert(records) {
531
- return handleInsertRowAt(this, records, null);
531
+ const $xeTable = this;
532
+ return handleInsertRowAt($xeTable, records, null);
532
533
  },
533
534
  /**
534
535
  * 往表格指定行中插入临时数据
@@ -538,19 +539,24 @@ export default {
538
539
  * @returns
539
540
  */
540
541
  _insertAt(records, targetRowOrRowid) {
541
- return handleInsertRowAt(this, records, targetRowOrRowid);
542
+ const $xeTable = this;
543
+ return handleInsertRowAt($xeTable, records, targetRowOrRowid);
542
544
  },
543
545
  _insertNextAt(records, targetRowOrRowid) {
544
- return handleInsertRowAt(this, records, targetRowOrRowid, true);
546
+ const $xeTable = this;
547
+ return handleInsertRowAt($xeTable, records, targetRowOrRowid, true);
545
548
  },
546
549
  _insertChild(records, parentRowOrParentId) {
547
- return handleInsertChildRowAt(this, records, parentRowOrParentId, null);
550
+ const $xeTable = this;
551
+ return handleInsertChildRowAt($xeTable, records, parentRowOrParentId, null);
548
552
  },
549
553
  _insertChildAt(records, parentRowOrParentId, targetRowOrRowid) {
550
- return handleInsertChildRowAt(this, records, parentRowOrParentId, targetRowOrRowid);
554
+ const $xeTable = this;
555
+ return handleInsertChildRowAt($xeTable, records, parentRowOrParentId, targetRowOrRowid);
551
556
  },
552
557
  _insertChildNextAt(records, parentRowOrParentId, targetRowOrRowid) {
553
- return handleInsertChildRowAt(this, records, parentRowOrParentId, targetRowOrRowid, true);
558
+ const $xeTable = this;
559
+ return handleInsertChildRowAt($xeTable, records, parentRowOrParentId, targetRowOrRowid, true);
554
560
  },
555
561
  /**
556
562
  * 删除指定行数据
@@ -2892,12 +2892,16 @@ function handleTooltip($xeTable, evnt, tipOpts, type, tdEl, overflowElem, tipEle
2892
2892
  // 如果为 null 使用默认逻辑
2893
2893
  if (XEUtils.eqNull(customContent)) {
2894
2894
  isShow = isOver;
2895
+ content = cellText;
2895
2896
  }
2896
2897
  else if (customContent !== '' && customContent !== false) {
2897
2898
  // 如果为 '' | false 则不显示
2898
2899
  isShow = true;
2900
+ content = customContent;
2901
+ }
2902
+ else {
2903
+ content = cellText;
2899
2904
  }
2900
- content = cellText;
2901
2905
  }
2902
2906
  if (isShow && content) {
2903
2907
  const tipContent = formatText(content);
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  import { getFuncText } from './src/utils';
3
- export const version = "3.21.21";
3
+ export const version = "3.21.22";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
package/es/ui/src/log.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const tableVersion = `table v${"3.21.21"}`;
3
+ const tableVersion = `table v${"3.21.22"}`;
4
4
  export function createComponentLog(name) {
5
5
  const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
6
6
  const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';