vxe-table 4.20.2 → 4.20.4

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 (162) hide show
  1. package/dist/all.esm.js +231 -114
  2. package/dist/style.css +1 -1
  3. package/es/locale/lang/ar-EG.js +7 -0
  4. package/es/locale/lang/de-DE.js +7 -0
  5. package/es/locale/lang/en-US.js +7 -0
  6. package/es/locale/lang/es-ES.js +7 -0
  7. package/es/locale/lang/fr-FR.js +7 -0
  8. package/es/locale/lang/hu-HU.js +7 -0
  9. package/es/locale/lang/hy-AM.js +7 -0
  10. package/es/locale/lang/id-ID.js +7 -0
  11. package/es/locale/lang/it-IT.js +7 -0
  12. package/es/locale/lang/ja-JP.js +7 -0
  13. package/es/locale/lang/ko-KR.js +7 -0
  14. package/es/locale/lang/ms-MY.js +7 -0
  15. package/es/locale/lang/nb-NO.js +7 -0
  16. package/es/locale/lang/pt-BR.js +7 -0
  17. package/es/locale/lang/ru-RU.js +7 -0
  18. package/es/locale/lang/th-TH.js +7 -0
  19. package/es/locale/lang/ug-CN.js +7 -0
  20. package/es/locale/lang/uk-UA.js +7 -0
  21. package/es/locale/lang/uz-UZ.js +7 -0
  22. package/es/locale/lang/vi-VN.js +7 -0
  23. package/es/locale/lang/zh-CHT.js +7 -0
  24. package/es/locale/lang/zh-CN.js +7 -0
  25. package/es/style.css +1 -1
  26. package/es/table/module/export/export-panel.js +61 -47
  27. package/es/table/module/export/hook.js +105 -27
  28. package/es/table/module/export/util.js +1 -1
  29. package/es/table/src/body.js +1 -1
  30. package/es/table/src/footer.js +1 -1
  31. package/es/table/src/header.js +5 -3
  32. package/es/table/src/table.js +48 -34
  33. package/es/table/src/util.js +1 -0
  34. package/es/ui/index.js +2 -1
  35. package/es/ui/src/log.js +1 -1
  36. package/lib/index.umd.js +164 -55
  37. package/lib/index.umd.min.js +1 -1
  38. package/lib/locale/lang/ar-EG.js +7 -0
  39. package/lib/locale/lang/ar-EG.min.js +1 -1
  40. package/lib/locale/lang/ar-EG.umd.js +7 -0
  41. package/lib/locale/lang/de-DE.js +7 -0
  42. package/lib/locale/lang/de-DE.min.js +1 -1
  43. package/lib/locale/lang/de-DE.umd.js +7 -0
  44. package/lib/locale/lang/en-US.js +7 -0
  45. package/lib/locale/lang/en-US.min.js +1 -1
  46. package/lib/locale/lang/en-US.umd.js +7 -0
  47. package/lib/locale/lang/es-ES.js +7 -0
  48. package/lib/locale/lang/es-ES.min.js +1 -1
  49. package/lib/locale/lang/es-ES.umd.js +7 -0
  50. package/lib/locale/lang/fr-FR.js +7 -0
  51. package/lib/locale/lang/fr-FR.min.js +1 -1
  52. package/lib/locale/lang/fr-FR.umd.js +7 -0
  53. package/lib/locale/lang/hu-HU.js +7 -0
  54. package/lib/locale/lang/hu-HU.min.js +1 -1
  55. package/lib/locale/lang/hu-HU.umd.js +7 -0
  56. package/lib/locale/lang/hy-AM.js +7 -0
  57. package/lib/locale/lang/hy-AM.min.js +1 -1
  58. package/lib/locale/lang/hy-AM.umd.js +7 -0
  59. package/lib/locale/lang/id-ID.js +7 -0
  60. package/lib/locale/lang/id-ID.min.js +1 -1
  61. package/lib/locale/lang/id-ID.umd.js +7 -0
  62. package/lib/locale/lang/it-IT.js +7 -0
  63. package/lib/locale/lang/it-IT.min.js +1 -1
  64. package/lib/locale/lang/it-IT.umd.js +7 -0
  65. package/lib/locale/lang/ja-JP.js +7 -0
  66. package/lib/locale/lang/ja-JP.min.js +1 -1
  67. package/lib/locale/lang/ja-JP.umd.js +7 -0
  68. package/lib/locale/lang/ko-KR.js +7 -0
  69. package/lib/locale/lang/ko-KR.min.js +1 -1
  70. package/lib/locale/lang/ko-KR.umd.js +7 -0
  71. package/lib/locale/lang/ms-MY.js +7 -0
  72. package/lib/locale/lang/ms-MY.min.js +1 -1
  73. package/lib/locale/lang/ms-MY.umd.js +7 -0
  74. package/lib/locale/lang/nb-NO.js +7 -0
  75. package/lib/locale/lang/nb-NO.min.js +1 -1
  76. package/lib/locale/lang/nb-NO.umd.js +7 -0
  77. package/lib/locale/lang/pt-BR.js +7 -0
  78. package/lib/locale/lang/pt-BR.min.js +1 -1
  79. package/lib/locale/lang/pt-BR.umd.js +7 -0
  80. package/lib/locale/lang/ru-RU.js +7 -0
  81. package/lib/locale/lang/ru-RU.min.js +1 -1
  82. package/lib/locale/lang/ru-RU.umd.js +7 -0
  83. package/lib/locale/lang/th-TH.js +7 -0
  84. package/lib/locale/lang/th-TH.min.js +1 -1
  85. package/lib/locale/lang/th-TH.umd.js +7 -0
  86. package/lib/locale/lang/ug-CN.js +7 -0
  87. package/lib/locale/lang/ug-CN.min.js +1 -1
  88. package/lib/locale/lang/ug-CN.umd.js +7 -0
  89. package/lib/locale/lang/uk-UA.js +7 -0
  90. package/lib/locale/lang/uk-UA.min.js +1 -1
  91. package/lib/locale/lang/uk-UA.umd.js +7 -0
  92. package/lib/locale/lang/uz-UZ.js +7 -0
  93. package/lib/locale/lang/uz-UZ.min.js +1 -1
  94. package/lib/locale/lang/uz-UZ.umd.js +7 -0
  95. package/lib/locale/lang/vi-VN.js +7 -0
  96. package/lib/locale/lang/vi-VN.min.js +1 -1
  97. package/lib/locale/lang/vi-VN.umd.js +7 -0
  98. package/lib/locale/lang/zh-CHT.js +7 -0
  99. package/lib/locale/lang/zh-CHT.min.js +1 -1
  100. package/lib/locale/lang/zh-CHT.umd.js +7 -0
  101. package/lib/locale/lang/zh-CN.js +7 -0
  102. package/lib/locale/lang/zh-CN.min.js +1 -1
  103. package/lib/locale/lang/zh-CN.umd.js +7 -0
  104. package/lib/style.css +1 -1
  105. package/lib/table/module/export/export-panel.js +32 -13
  106. package/lib/table/module/export/export-panel.min.js +1 -1
  107. package/lib/table/module/export/hook.js +105 -27
  108. package/lib/table/module/export/hook.min.js +1 -1
  109. package/lib/table/module/export/util.js +1 -1
  110. package/lib/table/module/export/util.min.js +1 -1
  111. package/lib/table/src/body.js +1 -1
  112. package/lib/table/src/body.min.js +1 -1
  113. package/lib/table/src/footer.js +1 -1
  114. package/lib/table/src/footer.min.js +1 -1
  115. package/lib/table/src/header.js +6 -3
  116. package/lib/table/src/header.min.js +1 -1
  117. package/lib/table/src/table.js +7 -7
  118. package/lib/table/src/table.min.js +1 -1
  119. package/lib/table/src/util.js +1 -0
  120. package/lib/table/src/util.min.js +1 -1
  121. package/lib/ui/index.js +2 -1
  122. package/lib/ui/index.min.js +1 -1
  123. package/lib/ui/src/log.js +1 -1
  124. package/lib/ui/src/log.min.js +1 -1
  125. package/package.json +2 -2
  126. package/packages/locale/lang/ar-EG.ts +7 -0
  127. package/packages/locale/lang/de-DE.ts +7 -0
  128. package/packages/locale/lang/en-US.ts +7 -0
  129. package/packages/locale/lang/es-ES.ts +7 -0
  130. package/packages/locale/lang/fr-FR.ts +7 -0
  131. package/packages/locale/lang/hu-HU.ts +7 -0
  132. package/packages/locale/lang/hy-AM.ts +7 -0
  133. package/packages/locale/lang/id-ID.ts +7 -0
  134. package/packages/locale/lang/it-IT.ts +7 -0
  135. package/packages/locale/lang/ja-JP.ts +7 -0
  136. package/packages/locale/lang/ko-KR.ts +7 -0
  137. package/packages/locale/lang/ms-MY.ts +7 -0
  138. package/packages/locale/lang/nb-NO.ts +7 -0
  139. package/packages/locale/lang/pt-BR.ts +7 -0
  140. package/packages/locale/lang/ru-RU.ts +7 -0
  141. package/packages/locale/lang/th-TH.ts +7 -0
  142. package/packages/locale/lang/ug-CN.ts +7 -0
  143. package/packages/locale/lang/uk-UA.ts +7 -0
  144. package/packages/locale/lang/uz-UZ.ts +7 -0
  145. package/packages/locale/lang/vi-VN.ts +7 -0
  146. package/packages/locale/lang/zh-CHT.ts +7 -0
  147. package/packages/locale/lang/zh-CN.ts +7 -0
  148. package/packages/table/module/export/export-panel.ts +120 -105
  149. package/packages/table/module/export/hook.ts +112 -28
  150. package/packages/table/module/export/util.ts +1 -1
  151. package/packages/table/src/body.ts +1 -1
  152. package/packages/table/src/footer.ts +1 -1
  153. package/packages/table/src/header.ts +5 -3
  154. package/packages/table/src/table.ts +48 -34
  155. package/packages/table/src/util.ts +3 -2
  156. package/packages/ui/index.ts +1 -0
  157. /package/es/{iconfont.1784122393131.ttf → iconfont.1784366386890.ttf} +0 -0
  158. /package/es/{iconfont.1784122393131.woff → iconfont.1784366386890.woff} +0 -0
  159. /package/es/{iconfont.1784122393131.woff2 → iconfont.1784366386890.woff2} +0 -0
  160. /package/lib/{iconfont.1784122393131.ttf → iconfont.1784366386890.ttf} +0 -0
  161. /package/lib/{iconfont.1784122393131.woff → iconfont.1784366386890.woff} +0 -0
  162. /package/lib/{iconfont.1784122393131.woff2 → iconfont.1784366386890.woff2} +0 -0
@@ -4,7 +4,7 @@ import XEUtils from 'xe-utils';
4
4
  import { initTpImg, getTpImg, isPx, isScale, hasClass, addClass, removeClass, wheelScrollTopTo, wheelScrollLeftTo, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey, checkTargetElement, hasEventInputTarget } from '../../ui/src/dom';
5
5
  import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils';
6
6
  import { VxeUI } from '../../ui';
7
- import { createReactData, createInternalData, getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, hasDeepKey, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, getColReMaxWidth, createHandleUpdateRowId, createHandleGetRowId, getCalcHeight, getCellRestHeight, getLastChildColumn, getRowMaxHeight, handleCustomStoreConfig } from './util';
7
+ import { createReactData, createInternalData, getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, hasDeepKey, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, getColReMaxWidth, createHandleUpdateRowId, createHandleGetRowId, getCalcHeight, getCellRestHeight, getLastChildColumn, getRowMaxHeight, handleCustomStoreConfig, encodeRowid } from './util';
8
8
  import { getSlotVNs } from '../../ui/src/vn';
9
9
  import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from '../../ui/src/anime';
10
10
  import { createComponentLog } from '../../ui/src/log';
@@ -2772,7 +2772,8 @@ export default defineVxeComponent({
2772
2772
  }
2773
2773
  else if (checkRowKeys) {
2774
2774
  const defSelection = [];
2775
- checkRowKeys.forEach((rowid) => {
2775
+ checkRowKeys.forEach((rowKey) => {
2776
+ const rowid = encodeRowid(rowKey);
2776
2777
  if (fullDataRowIdData[rowid]) {
2777
2778
  defSelection.push(fullDataRowIdData[rowid].row);
2778
2779
  }
@@ -2789,7 +2790,8 @@ export default defineVxeComponent({
2789
2790
  if (radioConfig) {
2790
2791
  const { fullDataRowIdData } = internalData;
2791
2792
  const radioOpts = computeRadioOpts.value;
2792
- const { checkRowKey: rowid, reserve } = radioOpts;
2793
+ const { checkRowKey: rowKey, reserve } = radioOpts;
2794
+ const rowid = rowKey ? encodeRowid(rowKey) : null;
2793
2795
  if (rowid) {
2794
2796
  if (fullDataRowIdData[rowid]) {
2795
2797
  handleCheckedRadioRow(fullDataRowIdData[rowid].row, true);
@@ -2815,7 +2817,8 @@ export default defineVxeComponent({
2815
2817
  }
2816
2818
  else if (expandRowKeys) {
2817
2819
  const defExpandeds = [];
2818
- expandRowKeys.forEach((rowid) => {
2820
+ expandRowKeys.forEach((rowKey) => {
2821
+ const rowid = encodeRowid(rowKey);
2819
2822
  if (fullDataRowIdData[rowid]) {
2820
2823
  defExpandeds.push(fullDataRowIdData[rowid].row);
2821
2824
  }
@@ -3074,7 +3077,8 @@ export default defineVxeComponent({
3074
3077
  }
3075
3078
  else if (expandRowKeys) {
3076
3079
  const defExpandeds = [];
3077
- expandRowKeys.forEach((rowid) => {
3080
+ expandRowKeys.forEach((rowKey) => {
3081
+ const rowid = encodeRowid(rowKey);
3078
3082
  const rowRest = fullAllDataRowIdData[rowid];
3079
3083
  if (rowRest) {
3080
3084
  defExpandeds.push(rowRest.row);
@@ -6397,13 +6401,14 @@ export default defineVxeComponent({
6397
6401
  }
6398
6402
  return handleCheckedCheckboxRow(rows, checked, true);
6399
6403
  },
6400
- setCheckboxRowKey(keys, checked) {
6404
+ setCheckboxRowByKey(keys, checked) {
6401
6405
  const { fullAllDataRowIdData } = internalData;
6402
6406
  if (!XEUtils.isArray(keys)) {
6403
6407
  keys = [keys];
6404
6408
  }
6405
6409
  const rows = [];
6406
- keys.forEach((rowid) => {
6410
+ keys.forEach((rowKey) => {
6411
+ const rowid = encodeRowid(rowKey);
6407
6412
  const rowRest = fullAllDataRowIdData[rowid];
6408
6413
  if (rowRest) {
6409
6414
  rows.push(rowRest.row);
@@ -6411,6 +6416,9 @@ export default defineVxeComponent({
6411
6416
  });
6412
6417
  return handleCheckedCheckboxRow(rows, checked, true);
6413
6418
  },
6419
+ setCheckboxRowKey(keys, checked) {
6420
+ return $xeTable.setCheckboxRowByKey(keys, checked);
6421
+ },
6414
6422
  isCheckedByCheckboxRow(row) {
6415
6423
  const { updateCheckboxFlag } = reactData;
6416
6424
  const { selectCheckboxMaps } = internalData;
@@ -6421,11 +6429,12 @@ export default defineVxeComponent({
6421
6429
  }
6422
6430
  return !!updateCheckboxFlag && !!selectCheckboxMaps[getRowid($xeTable, row)];
6423
6431
  },
6424
- isCheckedByCheckboxRowKey(rowid) {
6432
+ isCheckedByCheckboxRowKey(rowKey) {
6425
6433
  const { updateCheckboxFlag } = reactData;
6426
6434
  const { fullAllDataRowIdData, selectCheckboxMaps } = internalData;
6427
6435
  const checkboxOpts = computeCheckboxOpts.value;
6428
6436
  const { checkField } = checkboxOpts;
6437
+ const rowid = encodeRowid(rowKey);
6429
6438
  if (checkField) {
6430
6439
  const rowRest = fullAllDataRowIdData[rowid];
6431
6440
  if (rowRest) {
@@ -6439,8 +6448,9 @@ export default defineVxeComponent({
6439
6448
  const { treeIndeterminateRowMaps } = internalData;
6440
6449
  return !!treeIndeterminateRowMaps[getRowid($xeTable, row)] && !$xeTable.isCheckedByCheckboxRow(row);
6441
6450
  },
6442
- isIndeterminateByCheckboxRowKey(rowid) {
6451
+ isIndeterminateByCheckboxRowKey(rowKey) {
6443
6452
  const { treeIndeterminateRowMaps } = internalData;
6453
+ const rowid = encodeRowid(rowKey);
6444
6454
  return !!treeIndeterminateRowMaps[rowid] && !$xeTable.isCheckedByCheckboxRowKey(rowid);
6445
6455
  },
6446
6456
  /**
@@ -6633,14 +6643,18 @@ export default defineVxeComponent({
6633
6643
  * 用于单选行,设置某一行为选中状态
6634
6644
  * @param key 行主键
6635
6645
  */
6636
- setRadioRowKey(rowid) {
6646
+ setRadioByRowKey(rowKey) {
6637
6647
  const { fullAllDataRowIdData } = internalData;
6648
+ const rowid = encodeRowid(rowKey);
6638
6649
  const rowRest = fullAllDataRowIdData[rowid];
6639
6650
  if (rowRest) {
6640
6651
  return handleCheckedRadioRow(rowRest.row, true);
6641
6652
  }
6642
6653
  return nextTick();
6643
6654
  },
6655
+ setRadioRowKey(rowKey) {
6656
+ return $xeTable.setRadioByRowKey(rowKey);
6657
+ },
6644
6658
  /**
6645
6659
  * 用于当前行,手动清空当前高亮的状态
6646
6660
  */
@@ -14672,35 +14686,35 @@ export default defineVxeComponent({
14672
14686
  $xeTable.preventEvent(null, 'unmounted', { $table: $xeTable });
14673
14687
  });
14674
14688
  nextTick(() => {
14689
+ const { showOverflow, showHeaderOverflow, showFooterOverflow } = props;
14690
+ const tooltipOpts = computeTooltipOpts.value;
14691
+ const headerTooltipOpts = computeHeaderTooltipOpts.value;
14692
+ const footerTooltipOpts = computeFooterTooltipOpts.value;
14675
14693
  if (props.loading) {
14676
14694
  if (!VxeUILoadingComponent && !slots.loading) {
14677
- errLog('vxe.error.errProp', ['loading=true', 'loading=false | <template #loading>...</template>']);
14678
14695
  errLog('vxe.error.reqComp', ['vxe-loading']);
14696
+ errLog('vxe.error.errProp', ['loading=true', 'loading=false | <template #loading>...</template>']);
14679
14697
  }
14680
14698
  }
14681
- if ((props.showOverflow === true || props.showOverflow === 'tooltip') ||
14682
- (props.showHeaderOverflow === true || props.showHeaderOverflow === 'tooltip') ||
14683
- (props.showFooterOverflow === true || props.showFooterOverflow === 'tooltip')) {
14684
- if (!VxeUITooltipComponent) {
14685
- if (props.showOverflow === true) {
14686
- errLog('vxe.error.errProp', ['show-overflow=true', 'show-overflow=title']);
14687
- }
14688
- if (props.showOverflow === 'tooltip') {
14689
- errLog('vxe.error.errProp', ['show-overflow=tooltip', 'show-overflow=title']);
14690
- }
14691
- if (props.showHeaderOverflow === true) {
14692
- errLog('vxe.error.errProp', ['show-header-overflow=true', 'show-header-overflow=title']);
14693
- }
14694
- if (props.showHeaderOverflow === 'tooltip') {
14695
- errLog('vxe.error.errProp', ['show-header-overflow=tooltip', 'show-header-overflow=title']);
14696
- }
14697
- if (props.showFooterOverflow === true) {
14698
- errLog('vxe.error.errProp', ['show-footer-overflow=true', 'show-footer-overflow=title']);
14699
- }
14700
- if (props.showFooterOverflow === 'tooltip') {
14701
- errLog('vxe.error.errProp', ['show-footer-overflow=tooltip', 'show-footer-overflow=title']);
14702
- }
14703
- errLog('vxe.error.reqComp', ['vxe-tooltip']);
14699
+ if (!VxeUITooltipComponent) {
14700
+ errLog('vxe.error.reqComp', ['vxe-tooltip']);
14701
+ if (showOverflow === 'tooltip') {
14702
+ errLog('vxe.error.errProp', ['show-overflow=' + showOverflow, 'show-overflow=false,title,ellipsis']);
14703
+ }
14704
+ if (showOverflow === true && tooltipOpts.mode === 'tooltip') {
14705
+ errLog('vxe.error.notSupportProp', ['show-overflow=' + showOverflow, 'tooltip-config.mode=tooltip', 'tooltip-config.mode=title,ellipsis']);
14706
+ }
14707
+ if (showHeaderOverflow === 'tooltip') {
14708
+ errLog('vxe.error.errProp', ['show-header-overflow=' + showHeaderOverflow, 'show-header-overflow=false,title,ellipsis']);
14709
+ }
14710
+ if (showHeaderOverflow === true && headerTooltipOpts.mode === 'tooltip') {
14711
+ errLog('vxe.error.notSupportProp', ['show-header-overflow=' + showHeaderOverflow, 'header-tooltip-config.mode=tooltip', 'header-tooltip-config.mode=title,ellipsis']);
14712
+ }
14713
+ if (showFooterOverflow === 'tooltip') {
14714
+ errLog('vxe.error.errProp', ['show-footer-overflow=' + showFooterOverflow, 'show-footer-overflow=false,title,ellipsis']);
14715
+ }
14716
+ if (showFooterOverflow === true && footerTooltipOpts.mode === 'tooltip') {
14717
+ errLog('vxe.error.notSupportProp', ['show-footer-overflow=' + showFooterOverflow, 'footer-tooltip-config.mode=tooltip', 'footer-tooltip-config.mode=title,ellipsis']);
14704
14718
  }
14705
14719
  }
14706
14720
  });
@@ -364,6 +364,7 @@ export function createReactData() {
364
364
  mergeBodyFlag: 1,
365
365
  mergeFootFlag: 1,
366
366
  rowHeightStore: {
367
+ xlarge: 54,
367
368
  large: 52,
368
369
  default: 48,
369
370
  medium: 44,
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 = "4.20.2";
3
+ export const version = "4.20.4";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
@@ -66,6 +66,7 @@ VxeUI.setConfig({
66
66
  strict: true
67
67
  },
68
68
  tooltipConfig: {
69
+ mode: 'tooltip',
69
70
  enterable: true,
70
71
  defaultPlacement: 'top'
71
72
  },
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${"4.20.2"}`;
3
+ const tableVersion = `table v${"4.20.4"}`;
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}` : '';