vxe-table 4.12.3 → 4.12.5

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 (122) hide show
  1. package/es/locale/lang/ar-EG.js +4 -1
  2. package/es/locale/lang/de-DE.js +4 -1
  3. package/es/locale/lang/en-US.js +8 -5
  4. package/es/locale/lang/es-ES.js +4 -1
  5. package/es/locale/lang/fr-FR.js +4 -1
  6. package/es/locale/lang/hu-HU.js +4 -1
  7. package/es/locale/lang/hy-AM.js +4 -1
  8. package/es/locale/lang/id-ID.js +4 -1
  9. package/es/locale/lang/it-IT.js +4 -1
  10. package/es/locale/lang/ja-JP.js +4 -1
  11. package/es/locale/lang/ko-KR.js +4 -1
  12. package/es/locale/lang/nb-NO.js +4 -1
  13. package/es/locale/lang/pt-BR.js +4 -1
  14. package/es/locale/lang/ru-RU.js +4 -1
  15. package/es/locale/lang/th-TH.js +4 -1
  16. package/es/locale/lang/ug-CN.js +4 -1
  17. package/es/locale/lang/uk-UA.js +4 -1
  18. package/es/locale/lang/vi-VN.js +4 -1
  19. package/es/locale/lang/zh-CHT.js +4 -1
  20. package/es/locale/lang/zh-CN.js +4 -1
  21. package/es/style.css +1 -1
  22. package/es/table/module/export/export-panel.js +31 -19
  23. package/es/table/module/export/hook.js +3 -1
  24. package/es/table/module/keyboard/hook.js +26 -9
  25. package/es/table/src/table.js +81 -43
  26. package/es/ui/index.js +1 -1
  27. package/es/ui/src/log.js +1 -1
  28. package/lib/index.umd.js +1106 -12298
  29. package/lib/index.umd.min.js +1 -1
  30. package/lib/locale/lang/ar-EG.js +4 -1
  31. package/lib/locale/lang/ar-EG.min.js +1 -1
  32. package/lib/locale/lang/de-DE.js +4 -1
  33. package/lib/locale/lang/de-DE.min.js +1 -1
  34. package/lib/locale/lang/en-US.js +8 -5
  35. package/lib/locale/lang/en-US.min.js +1 -1
  36. package/lib/locale/lang/en-US.umd.js +8 -5
  37. package/lib/locale/lang/es-ES.js +4 -1
  38. package/lib/locale/lang/es-ES.min.js +1 -1
  39. package/lib/locale/lang/es-ES.umd.js +4 -1
  40. package/lib/locale/lang/fr-FR.js +4 -1
  41. package/lib/locale/lang/fr-FR.min.js +1 -1
  42. package/lib/locale/lang/hu-HU.js +4 -1
  43. package/lib/locale/lang/hu-HU.min.js +1 -1
  44. package/lib/locale/lang/hu-HU.umd.js +4 -1
  45. package/lib/locale/lang/hy-AM.js +4 -1
  46. package/lib/locale/lang/hy-AM.min.js +1 -1
  47. package/lib/locale/lang/id-ID.js +4 -1
  48. package/lib/locale/lang/id-ID.min.js +1 -1
  49. package/lib/locale/lang/it-IT.js +4 -1
  50. package/lib/locale/lang/it-IT.min.js +1 -1
  51. package/lib/locale/lang/ja-JP.js +4 -1
  52. package/lib/locale/lang/ja-JP.min.js +1 -1
  53. package/lib/locale/lang/ja-JP.umd.js +4 -1
  54. package/lib/locale/lang/ko-KR.js +4 -1
  55. package/lib/locale/lang/ko-KR.min.js +1 -1
  56. package/lib/locale/lang/ko-KR.umd.js +4 -1
  57. package/lib/locale/lang/nb-NO.js +4 -1
  58. package/lib/locale/lang/nb-NO.min.js +1 -1
  59. package/lib/locale/lang/pt-BR.js +4 -1
  60. package/lib/locale/lang/pt-BR.min.js +1 -1
  61. package/lib/locale/lang/pt-BR.umd.js +4 -1
  62. package/lib/locale/lang/ru-RU.js +4 -1
  63. package/lib/locale/lang/ru-RU.min.js +1 -1
  64. package/lib/locale/lang/ru-RU.umd.js +4 -1
  65. package/lib/locale/lang/th-TH.js +4 -1
  66. package/lib/locale/lang/th-TH.min.js +1 -1
  67. package/lib/locale/lang/ug-CN.js +4 -1
  68. package/lib/locale/lang/ug-CN.min.js +1 -1
  69. package/lib/locale/lang/uk-UA.js +4 -1
  70. package/lib/locale/lang/uk-UA.min.js +1 -1
  71. package/lib/locale/lang/uk-UA.umd.js +4 -1
  72. package/lib/locale/lang/vi-VN.js +4 -1
  73. package/lib/locale/lang/vi-VN.min.js +1 -1
  74. package/lib/locale/lang/zh-CHT.js +4 -1
  75. package/lib/locale/lang/zh-CHT.min.js +1 -1
  76. package/lib/locale/lang/zh-CN.js +4 -1
  77. package/lib/locale/lang/zh-CN.min.js +1 -1
  78. package/lib/locale/lang/zh-CN.umd.js +4 -1
  79. package/lib/style.css +1 -1
  80. package/lib/table/module/export/export-panel.js +26 -19
  81. package/lib/table/module/export/export-panel.min.js +1 -1
  82. package/lib/table/module/export/hook.js +3 -1
  83. package/lib/table/module/export/hook.min.js +1 -1
  84. package/lib/table/module/keyboard/hook.js +27 -9
  85. package/lib/table/module/keyboard/hook.min.js +1 -1
  86. package/lib/table/src/table.js +86 -44
  87. package/lib/table/src/table.min.js +1 -1
  88. package/lib/ui/index.js +1 -1
  89. package/lib/ui/index.min.js +1 -1
  90. package/lib/ui/src/log.js +1 -1
  91. package/lib/ui/src/log.min.js +1 -1
  92. package/package.json +2 -2
  93. package/packages/locale/lang/ar-EG.ts +4 -1
  94. package/packages/locale/lang/de-DE.ts +4 -1
  95. package/packages/locale/lang/en-US.ts +8 -5
  96. package/packages/locale/lang/es-ES.ts +4 -1
  97. package/packages/locale/lang/fr-FR.ts +4 -1
  98. package/packages/locale/lang/hu-HU.ts +4 -1
  99. package/packages/locale/lang/hy-AM.ts +4 -1
  100. package/packages/locale/lang/id-ID.ts +4 -1
  101. package/packages/locale/lang/it-IT.ts +4 -1
  102. package/packages/locale/lang/ja-JP.ts +4 -1
  103. package/packages/locale/lang/ko-KR.ts +4 -1
  104. package/packages/locale/lang/nb-NO.ts +4 -1
  105. package/packages/locale/lang/pt-BR.ts +4 -1
  106. package/packages/locale/lang/ru-RU.ts +4 -1
  107. package/packages/locale/lang/th-TH.ts +4 -1
  108. package/packages/locale/lang/ug-CN.ts +4 -1
  109. package/packages/locale/lang/uk-UA.ts +4 -1
  110. package/packages/locale/lang/vi-VN.ts +4 -1
  111. package/packages/locale/lang/zh-CHT.ts +4 -1
  112. package/packages/locale/lang/zh-CN.ts +4 -1
  113. package/packages/table/module/export/export-panel.ts +31 -19
  114. package/packages/table/module/export/hook.ts +3 -1
  115. package/packages/table/module/keyboard/hook.ts +24 -9
  116. package/packages/table/src/table.ts +82 -42
  117. /package/es/{iconfont.1743389164894.ttf → iconfont.1743479147314.ttf} +0 -0
  118. /package/es/{iconfont.1743389164894.woff → iconfont.1743479147314.woff} +0 -0
  119. /package/es/{iconfont.1743389164894.woff2 → iconfont.1743479147314.woff2} +0 -0
  120. /package/lib/{iconfont.1743389164894.ttf → iconfont.1743479147314.ttf} +0 -0
  121. /package/lib/{iconfont.1743389164894.woff → iconfont.1743479147314.woff} +0 -0
  122. /package/lib/{iconfont.1743389164894.woff2 → iconfont.1743479147314.woff2} +0 -0
@@ -255,6 +255,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
255
255
  original: false,
256
256
  message: true,
257
257
  isHeader: false,
258
+ isTitle: false,
258
259
  isFooter: false
259
260
  },
260
261
  rowExpandedFlag: 1,
@@ -879,6 +880,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
879
880
  computeBodyMenu,
880
881
  computeFooterMenu,
881
882
  computeIsMenu,
883
+ computeMenuList,
882
884
  computeMenuOpts,
883
885
  computeExportOpts,
884
886
  computeImportOpts,
@@ -1367,6 +1369,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
1367
1369
  const expandOpts = computeExpandOpts.value;
1368
1370
  const columnOpts = computeColumnOpts.value;
1369
1371
  const columnDragOpts = computeColumnDragOpts.value;
1372
+ const virtualYOpts = computeVirtualYOpts.value;
1370
1373
  const {
1371
1374
  isCrossDrag,
1372
1375
  isSelfToChildDrag
@@ -1420,39 +1423,33 @@ var _default = exports.default = (0, _vue.defineComponent)({
1420
1423
  htmlColumn = column;
1421
1424
  }
1422
1425
  if (treeNode) {
1423
- if (process.env.NODE_ENV === 'development') {
1424
- if (treeNodeColumn) {
1425
- (0, _log.warnLog)('vxe.error.colRepet', ['tree-node', treeNode]);
1426
- }
1426
+ if (treeNodeColumn) {
1427
+ (0, _log.warnLog)('vxe.error.colRepet', ['tree-node', treeNode]);
1427
1428
  }
1428
1429
  if (!treeNodeColumn) {
1429
1430
  treeNodeColumn = column;
1430
1431
  }
1431
1432
  } else if (type === 'expand') {
1432
- if (process.env.NODE_ENV === 'development') {
1433
- if (expandColumn) {
1434
- (0, _log.warnLog)('vxe.error.colRepet', ['type', type]);
1435
- }
1433
+ if (expandColumn) {
1434
+ (0, _log.warnLog)('vxe.error.colRepet', ['type', type]);
1436
1435
  }
1437
1436
  if (!expandColumn) {
1438
1437
  expandColumn = column;
1439
1438
  }
1440
1439
  }
1441
- if (process.env.NODE_ENV === 'development') {
1442
- if (type === 'checkbox') {
1443
- if (checkboxColumn) {
1444
- (0, _log.warnLog)('vxe.error.colRepet', ['type', type]);
1445
- }
1446
- if (!checkboxColumn) {
1447
- checkboxColumn = column;
1448
- }
1449
- } else if (type === 'radio') {
1450
- if (radioColumn) {
1451
- (0, _log.warnLog)('vxe.error.colRepet', ['type', type]);
1452
- }
1453
- if (!radioColumn) {
1454
- radioColumn = column;
1455
- }
1440
+ if (type === 'checkbox') {
1441
+ if (checkboxColumn) {
1442
+ (0, _log.warnLog)('vxe.error.colRepet', ['type', type]);
1443
+ }
1444
+ if (!checkboxColumn) {
1445
+ checkboxColumn = column;
1446
+ }
1447
+ } else if (type === 'radio') {
1448
+ if (radioColumn) {
1449
+ (0, _log.warnLog)('vxe.error.colRepet', ['type', type]);
1450
+ }
1451
+ if (!radioColumn) {
1452
+ radioColumn = column;
1456
1453
  }
1457
1454
  }
1458
1455
  if (isAllOverflow && column.showOverflow === false) {
@@ -1471,6 +1468,9 @@ var _default = exports.default = (0, _vue.defineComponent)({
1471
1468
  } else {
1472
1469
  tableFullColumn.forEach(handleFunc);
1473
1470
  }
1471
+ if (expandColumn && expandOpts.mode !== 'fixed' && virtualYOpts.enabled) {
1472
+ (0, _log.warnLog)('vxe.error.notConflictProp', ['column.type="expand', 'virtual-y-config.enabled=false']);
1473
+ }
1474
1474
  if (expandColumn && expandOpts.mode !== 'fixed' && mouseOpts.area) {
1475
1475
  (0, _log.errLog)('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand']);
1476
1476
  }
@@ -3083,6 +3083,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
3083
3083
  lastScrollTop
3084
3084
  } = internalData;
3085
3085
  const treeOpts = computeTreeOpts.value;
3086
+ const expandOpts = computeExpandOpts.value;
3086
3087
  const {
3087
3088
  transform
3088
3089
  } = treeOpts;
@@ -3170,6 +3171,9 @@ var _default = exports.default = (0, _vue.defineComponent)({
3170
3171
  scrollYStore.endIndex = scrollYStore.visibleSize;
3171
3172
  }
3172
3173
  if (sYLoad) {
3174
+ if (reactData.expandColumn && expandOpts.mode !== 'fixed') {
3175
+ (0, _log.errLog)('vxe.error.notConflictProp', ['column.type="expand', 'expand-config.mode="fixed"']);
3176
+ }
3173
3177
  // if (showOverflow) {
3174
3178
  // if (!rowOpts.height) {
3175
3179
  // const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false)
@@ -4779,6 +4783,9 @@ var _default = exports.default = (0, _vue.defineComponent)({
4779
4783
  const {
4780
4784
  treeConfig
4781
4785
  } = props;
4786
+ const {
4787
+ updateCheckboxFlag
4788
+ } = reactData;
4782
4789
  const {
4783
4790
  tableFullData,
4784
4791
  afterFullData,
@@ -4799,28 +4806,30 @@ var _default = exports.default = (0, _vue.defineComponent)({
4799
4806
  } = checkboxOpts;
4800
4807
  const childrenField = treeOpts.children || treeOpts.childrenField;
4801
4808
  let rowList = [];
4802
- if (checkField) {
4803
- if (treeConfig) {
4804
- const currTableData = isFull ? transform ? tableFullTreeData : tableFullData : transform ? afterTreeFullData : afterFullData;
4805
- rowList = _xeUtils.default.filterTree(currTableData, row => _xeUtils.default.get(row, checkField), {
4806
- children: transform ? mapChildrenField : childrenField
4807
- });
4808
- } else {
4809
- const currTableData = isFull ? tableFullData : afterFullData;
4810
- rowList = currTableData.filter(row => _xeUtils.default.get(row, checkField));
4811
- }
4812
- } else {
4813
- _xeUtils.default.each(selectCheckboxMaps, (row, rowid) => {
4814
- if (isFull) {
4815
- if (fullDataRowIdData[rowid]) {
4816
- rowList.push(fullDataRowIdData[rowid].row);
4817
- }
4809
+ if (updateCheckboxFlag) {
4810
+ if (checkField) {
4811
+ if (treeConfig) {
4812
+ const currTableData = isFull ? transform ? tableFullTreeData : tableFullData : transform ? afterTreeFullData : afterFullData;
4813
+ rowList = _xeUtils.default.filterTree(currTableData, row => _xeUtils.default.get(row, checkField), {
4814
+ children: transform ? mapChildrenField : childrenField
4815
+ });
4818
4816
  } else {
4819
- if (afterFullRowMaps[rowid]) {
4820
- rowList.push(afterFullRowMaps[rowid]);
4821
- }
4817
+ const currTableData = isFull ? tableFullData : afterFullData;
4818
+ rowList = currTableData.filter(row => _xeUtils.default.get(row, checkField));
4822
4819
  }
4823
- });
4820
+ } else {
4821
+ _xeUtils.default.each(selectCheckboxMaps, (row, rowid) => {
4822
+ if (isFull) {
4823
+ if (fullDataRowIdData[rowid]) {
4824
+ rowList.push(fullDataRowIdData[rowid].row);
4825
+ }
4826
+ } else {
4827
+ if (afterFullRowMaps[rowid]) {
4828
+ rowList.push(afterFullRowMaps[rowid]);
4829
+ }
4830
+ }
4831
+ });
4832
+ }
4824
4833
  }
4825
4834
  return rowList;
4826
4835
  },
@@ -11832,7 +11841,9 @@ var _default = exports.default = (0, _vue.defineComponent)({
11832
11841
  exportConfig,
11833
11842
  importConfig,
11834
11843
  treeConfig,
11835
- showOverflow
11844
+ showOverflow,
11845
+ highlightCurrentRow,
11846
+ highlightCurrentColumn
11836
11847
  } = props;
11837
11848
  const {
11838
11849
  scrollXStore,
@@ -11848,6 +11859,11 @@ var _default = exports.default = (0, _vue.defineComponent)({
11848
11859
  const mouseOpts = computeMouseOpts.value;
11849
11860
  const exportOpts = computeExportOpts.value;
11850
11861
  const importOpts = computeImportOpts.value;
11862
+ const currentRowOpts = computeCurrentRowOpts.value;
11863
+ const currentColumnOpts = computeCurrentColumnOpts.value;
11864
+ const virtualXOpts = computeVirtualXOpts.value;
11865
+ const virtualYOpts = computeVirtualYOpts.value;
11866
+ const keyboardOpts = computeKeyboardOpts.value;
11851
11867
  if (props.rowId) {
11852
11868
  (0, _log.warnLog)('vxe.error.delProp', ['row-id', 'row-config.keyField']);
11853
11869
  }
@@ -11887,6 +11903,12 @@ var _default = exports.default = (0, _vue.defineComponent)({
11887
11903
  if (props.highlightHoverColumn) {
11888
11904
  (0, _log.warnLog)('vxe.error.delProp', ['highlight-hover-column', 'column-config.isHover']);
11889
11905
  }
11906
+ // if (props.scrollY) {
11907
+ // warnLog('vxe.error.delProp', ['scroll-y', 'virtual-y-config'])
11908
+ // }
11909
+ // if (props.scrollX) {
11910
+ // warnLog('vxe.error.delProp', ['scroll-x', 'virtual-x-config'])
11911
+ // }
11890
11912
  // 检查导入导出类型,如果自定义导入导出方法,则不校验类型
11891
11913
  if (importConfig && importOpts.types && !importOpts.importMethod && !_xeUtils.default.includeArrays(_xeUtils.default.keys(importOpts._typeMaps), importOpts.types)) {
11892
11914
  (0, _log.warnLog)('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter(type => _xeUtils.default.includes(_xeUtils.default.keys(importOpts._typeMaps), type)).join(',') || _xeUtils.default.keys(importOpts._typeMaps).join(',')]);
@@ -11947,6 +11969,26 @@ var _default = exports.default = (0, _vue.defineComponent)({
11947
11969
  if (checkboxOpts.halfField) {
11948
11970
  (0, _log.warnLog)('vxe.error.delProp', ['checkbox-config.halfField', 'checkbox-config.indeterminateField']);
11949
11971
  }
11972
+ if ((rowOpts.isCurrent || highlightCurrentRow) && props.keyboardConfig && keyboardOpts.isArrow && !_xeUtils.default.isBoolean(currentRowOpts.isFollowSelected)) {
11973
+ (0, _log.warnLog)('vxe.error.notConflictProp', ['row-config.isCurrent', 'current-row-config.isFollowSelected']);
11974
+ }
11975
+ if ((columnOpts.isCurrent || highlightCurrentColumn) && props.keyboardConfig && keyboardOpts.isArrow && !_xeUtils.default.isBoolean(currentColumnOpts.isFollowSelected)) {
11976
+ (0, _log.warnLog)('vxe.error.notConflictProp', ['column-config.isCurrent', 'current-column-config.isFollowSelected']);
11977
+ }
11978
+ // 如果不支持虚拟滚动
11979
+ if (props.spanMethod) {
11980
+ if (virtualXOpts.enabled) {
11981
+ (0, _log.warnLog)('vxe.error.notConflictProp', ['span-method', 'virtual-x-config.enabled=false']);
11982
+ }
11983
+ if (virtualYOpts.enabled) {
11984
+ (0, _log.warnLog)('vxe.error.notConflictProp', ['span-method', 'virtual-y-config.enabled=false']);
11985
+ }
11986
+ }
11987
+ if (props.footerSpanMethod) {
11988
+ if (virtualXOpts.enabled) {
11989
+ (0, _log.warnLog)('vxe.error.notConflictProp', ['footer-span-method', 'virtual-x-config.enabled=false']);
11990
+ }
11991
+ }
11950
11992
  // 检查是否有安装需要的模块
11951
11993
  if (props.editConfig && !$xeTable.insert) {
11952
11994
  (0, _log.errLog)('vxe.error.reqModule', ['Edit']);