vxe-table 3.11.22 → 3.11.24

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 (98) hide show
  1. package/es/locale/lang/ar-EG.js +1 -1
  2. package/es/locale/lang/de-DE.js +1 -1
  3. package/es/locale/lang/es-ES.js +2 -2
  4. package/es/locale/lang/fr-FR.js +1 -1
  5. package/es/locale/lang/hu-HU.js +1 -1
  6. package/es/locale/lang/hy-AM.js +1 -1
  7. package/es/locale/lang/ja-JP.js +1 -1
  8. package/es/locale/lang/ko-KR.js +1 -1
  9. package/es/locale/lang/nb-NO.js +1 -1
  10. package/es/locale/lang/pt-BR.js +1 -1
  11. package/es/locale/lang/ru-RU.js +1 -1
  12. package/es/locale/lang/ug-CN.js +1 -1
  13. package/es/locale/lang/uk-UA.js +1 -1
  14. package/es/locale/lang/vi-VN.js +1 -1
  15. package/es/locale/lang/zh-CHT.js +1 -1
  16. package/es/locale/lang/zh-CN.js +1 -1
  17. package/es/style.css +1 -1
  18. package/es/table/render/index.js +26 -6
  19. package/es/table/src/methods.js +23 -5
  20. package/es/ui/index.js +1 -1
  21. package/es/ui/src/log.js +1 -1
  22. package/lib/index.umd.js +78 -17
  23. package/lib/index.umd.min.js +1 -1
  24. package/lib/locale/lang/ar-EG.js +1 -1
  25. package/lib/locale/lang/ar-EG.min.js +1 -1
  26. package/lib/locale/lang/de-DE.js +1 -1
  27. package/lib/locale/lang/de-DE.min.js +1 -1
  28. package/lib/locale/lang/es-ES.js +2 -2
  29. package/lib/locale/lang/es-ES.min.js +1 -1
  30. package/lib/locale/lang/es-ES.umd.js +2 -2
  31. package/lib/locale/lang/fr-FR.js +1 -1
  32. package/lib/locale/lang/fr-FR.min.js +1 -1
  33. package/lib/locale/lang/hu-HU.js +1 -1
  34. package/lib/locale/lang/hu-HU.min.js +1 -1
  35. package/lib/locale/lang/hu-HU.umd.js +1 -1
  36. package/lib/locale/lang/hy-AM.js +1 -1
  37. package/lib/locale/lang/hy-AM.min.js +1 -1
  38. package/lib/locale/lang/ja-JP.js +1 -1
  39. package/lib/locale/lang/ja-JP.min.js +1 -1
  40. package/lib/locale/lang/ja-JP.umd.js +1 -1
  41. package/lib/locale/lang/ko-KR.js +1 -1
  42. package/lib/locale/lang/ko-KR.min.js +1 -1
  43. package/lib/locale/lang/ko-KR.umd.js +1 -1
  44. package/lib/locale/lang/nb-NO.js +1 -1
  45. package/lib/locale/lang/nb-NO.min.js +1 -1
  46. package/lib/locale/lang/pt-BR.js +1 -1
  47. package/lib/locale/lang/pt-BR.min.js +1 -1
  48. package/lib/locale/lang/pt-BR.umd.js +1 -1
  49. package/lib/locale/lang/ru-RU.js +1 -1
  50. package/lib/locale/lang/ru-RU.min.js +1 -1
  51. package/lib/locale/lang/ru-RU.umd.js +1 -1
  52. package/lib/locale/lang/ug-CN.js +1 -1
  53. package/lib/locale/lang/ug-CN.min.js +1 -1
  54. package/lib/locale/lang/uk-UA.js +1 -1
  55. package/lib/locale/lang/uk-UA.min.js +1 -1
  56. package/lib/locale/lang/uk-UA.umd.js +1 -1
  57. package/lib/locale/lang/vi-VN.js +1 -1
  58. package/lib/locale/lang/vi-VN.min.js +1 -1
  59. package/lib/locale/lang/zh-CHT.js +1 -1
  60. package/lib/locale/lang/zh-CHT.min.js +1 -1
  61. package/lib/locale/lang/zh-CHT.umd.js +1 -1
  62. package/lib/locale/lang/zh-CN.js +1 -1
  63. package/lib/locale/lang/zh-CN.min.js +1 -1
  64. package/lib/locale/lang/zh-CN.umd.js +1 -1
  65. package/lib/style.css +1 -1
  66. package/lib/table/render/index.js +38 -6
  67. package/lib/table/render/index.min.js +1 -1
  68. package/lib/table/src/methods.js +36 -8
  69. package/lib/table/src/methods.min.js +1 -1
  70. package/lib/ui/index.js +1 -1
  71. package/lib/ui/index.min.js +1 -1
  72. package/lib/ui/src/log.js +1 -1
  73. package/lib/ui/src/log.min.js +1 -1
  74. package/package.json +2 -2
  75. package/packages/locale/lang/ar-EG.ts +1 -1
  76. package/packages/locale/lang/de-DE.ts +1 -1
  77. package/packages/locale/lang/es-ES.ts +2 -2
  78. package/packages/locale/lang/fr-FR.ts +1 -1
  79. package/packages/locale/lang/hu-HU.ts +1 -1
  80. package/packages/locale/lang/hy-AM.ts +1 -1
  81. package/packages/locale/lang/ja-JP.ts +1 -1
  82. package/packages/locale/lang/ko-KR.ts +1 -1
  83. package/packages/locale/lang/nb-NO.ts +1 -1
  84. package/packages/locale/lang/pt-BR.ts +1 -1
  85. package/packages/locale/lang/ru-RU.ts +1 -1
  86. package/packages/locale/lang/ug-CN.ts +1 -1
  87. package/packages/locale/lang/uk-UA.ts +1 -1
  88. package/packages/locale/lang/vi-VN.ts +1 -1
  89. package/packages/locale/lang/zh-CHT.ts +1 -1
  90. package/packages/locale/lang/zh-CN.ts +1 -1
  91. package/packages/table/render/index.ts +24 -5
  92. package/packages/table/src/methods.ts +25 -5
  93. /package/es/{iconfont.1733702408214.ttf → iconfont.1733816028970.ttf} +0 -0
  94. /package/es/{iconfont.1733702408214.woff → iconfont.1733816028970.woff} +0 -0
  95. /package/es/{iconfont.1733702408214.woff2 → iconfont.1733816028970.woff2} +0 -0
  96. /package/lib/{iconfont.1733702408214.ttf → iconfont.1733816028970.ttf} +0 -0
  97. /package/lib/{iconfont.1733702408214.woff → iconfont.1733816028970.woff} +0 -0
  98. /package/lib/{iconfont.1733702408214.woff2 → iconfont.1733816028970.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
2220
2220
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2221
2221
 
2222
2222
 
2223
- const version = "3.11.22";
2223
+ const version = "3.11.24";
2224
2224
  core_.VxeUI.version = version;
2225
2225
  core_.VxeUI.tableVersion = version;
2226
2226
  core_.VxeUI.setConfig({
@@ -2788,7 +2788,7 @@ function isNodeElement(elem) {
2788
2788
  const {
2789
2789
  log: log_log
2790
2790
  } = core_.VxeUI;
2791
- const log_version = `table v${"3.11.22"}`;
2791
+ const log_version = `table v${"3.11.24"}`;
2792
2792
  const warnLog = log_log.create('warn', log_version);
2793
2793
  const errLog = log_log.create('error', log_version);
2794
2794
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -5945,6 +5945,9 @@ const Methods = {
5945
5945
  };
5946
5946
  }
5947
5947
  if (isSource) {
5948
+ cacheItem.row = row;
5949
+ cacheItem.items = items;
5950
+ cacheItem.parent = parent;
5948
5951
  cacheItem.level = level;
5949
5952
  cacheItem.index = treeConfig && parent ? -1 : index;
5950
5953
  fullDataRowIdMaps[rowid] = cacheItem;
@@ -10415,21 +10418,46 @@ const Methods = {
10415
10418
  }, evnt);
10416
10419
  }
10417
10420
  },
10421
+ triggerCurrentColumnEvent(evnt, params) {
10422
+ const $xeTable = this;
10423
+ const columnOpts = $xeTable.computeColumnOpts;
10424
+ const {
10425
+ currentMethod
10426
+ } = columnOpts;
10427
+ const {
10428
+ column
10429
+ } = params;
10430
+ if (!currentMethod || currentMethod({
10431
+ column
10432
+ })) {
10433
+ $xeTable.setCurrentColumn(column);
10434
+ }
10435
+ },
10418
10436
  triggerCurrentRowEvent(evnt, params) {
10437
+ const $xeTable = this;
10438
+ const reactData = $xeTable;
10419
10439
  const {
10420
10440
  currentRow: oldValue
10421
- } = this;
10441
+ } = reactData;
10442
+ const rowOpts = $xeTable.computeRowOpts;
10443
+ const {
10444
+ currentMethod
10445
+ } = rowOpts;
10422
10446
  const {
10423
10447
  row: newValue
10424
10448
  } = params;
10425
10449
  const isChange = oldValue !== newValue;
10426
- this.setCurrentRow(newValue);
10427
- if (isChange) {
10428
- this.emitEvent('current-change', {
10429
- oldValue,
10430
- newValue,
10431
- ...params
10432
- }, evnt);
10450
+ if (!currentMethod || currentMethod({
10451
+ row: newValue
10452
+ })) {
10453
+ $xeTable.setCurrentRow(newValue);
10454
+ if (isChange) {
10455
+ $xeTable.dispatchEvent('current-change', {
10456
+ oldValue,
10457
+ newValue,
10458
+ ...params
10459
+ }, evnt);
10460
+ }
10433
10461
  }
10434
10462
  },
10435
10463
  /**
@@ -10576,7 +10604,7 @@ const Methods = {
10576
10604
  cell
10577
10605
  }, params), evnt);
10578
10606
  if (this.columnOpts.isCurrent || this.highlightCurrentColumn) {
10579
- return this.setCurrentColumn(column);
10607
+ this.triggerCurrentColumnEvent(evnt, params);
10580
10608
  }
10581
10609
  return this.$nextTick();
10582
10610
  },
@@ -26863,17 +26891,50 @@ render_renderer.mixin({
26863
26891
  row,
26864
26892
  column
26865
26893
  } = params;
26866
- const digits = props.digits || render_getConfig().numberInput?.digits || 2;
26894
+ const {
26895
+ type
26896
+ } = props;
26867
26897
  let cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
26868
26898
  if (cellValue) {
26869
- switch (props.type) {
26870
- case 'float':
26871
- cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFixed(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(cellValue, digits), digits);
26872
- break;
26899
+ if (type === 'float') {
26900
+ const digits = props.digits || render_getConfig().numberInput.digits || 1;
26901
+ cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFixed(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(cellValue, digits), digits);
26902
+ } else if (type === 'amount') {
26903
+ const digits = props.digits || render_getConfig().numberInput.digits || 2;
26904
+ cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().commafy(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue), {
26905
+ digits
26906
+ });
26873
26907
  }
26874
26908
  }
26875
26909
  return getCellLabelVNs(h, renderOpts, params, cellValue);
26876
26910
  },
26911
+ renderTableFooter(h, renderOpts, params) {
26912
+ const {
26913
+ props = {}
26914
+ } = renderOpts;
26915
+ const {
26916
+ row,
26917
+ column,
26918
+ _columnIndex
26919
+ } = params;
26920
+ const {
26921
+ type
26922
+ } = props;
26923
+ // 兼容老模式
26924
+ const cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(row) ? row[_columnIndex] : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
26925
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(cellValue)) {
26926
+ if (type === 'float') {
26927
+ const digits = props.digits || render_getConfig().numberInput.digits || 1;
26928
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFixed(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(cellValue, digits), digits);
26929
+ } else if (type === 'amount') {
26930
+ const digits = props.digits || render_getConfig().numberInput.digits || 2;
26931
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().commafy(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue), {
26932
+ digits
26933
+ });
26934
+ }
26935
+ }
26936
+ return getFuncText(cellValue, 1);
26937
+ },
26877
26938
  renderTableDefault: defaultEditRender,
26878
26939
  renderTableFilter: defaultFilterRender,
26879
26940
  tableFilterDefaultMethod: handleInputFilterMethod
@@ -27260,7 +27321,7 @@ const Toolbar = VxeToolbar;
27260
27321
  impFields: '导入失败,请检查字段名和数据格式是否正确',
27261
27322
  treeNotImp: '树表格不支持导入',
27262
27323
  treeCrossDrag: '只能拖拽第一层级的数据',
27263
- treeDragChild: '父级数据不能拖拽到子级中',
27324
+ treeDragChild: '父级数据不能拖拽到自己的子级中',
27264
27325
  reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
27265
27326
  },
27266
27327
  table: {