vxe-table 3.11.22 → 3.11.23

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 +20 -5
  20. package/es/ui/index.js +1 -1
  21. package/es/ui/src/log.js +1 -1
  22. package/lib/index.umd.js +75 -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 +33 -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 +1 -1
  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 +22 -5
  93. /package/es/{iconfont.1733702408214.ttf → iconfont.1733805838288.ttf} +0 -0
  94. /package/es/{iconfont.1733702408214.woff → iconfont.1733805838288.woff} +0 -0
  95. /package/es/{iconfont.1733702408214.woff2 → iconfont.1733805838288.woff2} +0 -0
  96. /package/lib/{iconfont.1733702408214.ttf → iconfont.1733805838288.ttf} +0 -0
  97. /package/lib/{iconfont.1733702408214.woff → iconfont.1733805838288.woff} +0 -0
  98. /package/lib/{iconfont.1733702408214.woff2 → iconfont.1733805838288.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.23";
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.23"}`;
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
@@ -10415,21 +10415,46 @@ const Methods = {
10415
10415
  }, evnt);
10416
10416
  }
10417
10417
  },
10418
+ triggerCurrentColumnEvent(evnt, params) {
10419
+ const $xeTable = this;
10420
+ const columnOpts = $xeTable.computeColumnOpts;
10421
+ const {
10422
+ currentMethod
10423
+ } = columnOpts;
10424
+ const {
10425
+ column
10426
+ } = params;
10427
+ if (!currentMethod || currentMethod({
10428
+ column
10429
+ })) {
10430
+ $xeTable.setCurrentColumn(column);
10431
+ }
10432
+ },
10418
10433
  triggerCurrentRowEvent(evnt, params) {
10434
+ const $xeTable = this;
10435
+ const reactData = $xeTable;
10419
10436
  const {
10420
10437
  currentRow: oldValue
10421
- } = this;
10438
+ } = reactData;
10439
+ const rowOpts = $xeTable.computeRowOpts;
10440
+ const {
10441
+ currentMethod
10442
+ } = rowOpts;
10422
10443
  const {
10423
10444
  row: newValue
10424
10445
  } = params;
10425
10446
  const isChange = oldValue !== newValue;
10426
- this.setCurrentRow(newValue);
10427
- if (isChange) {
10428
- this.emitEvent('current-change', {
10429
- oldValue,
10430
- newValue,
10431
- ...params
10432
- }, evnt);
10447
+ if (!currentMethod || currentMethod({
10448
+ row: newValue
10449
+ })) {
10450
+ $xeTable.setCurrentRow(newValue);
10451
+ if (isChange) {
10452
+ $xeTable.dispatchEvent('current-change', {
10453
+ oldValue,
10454
+ newValue,
10455
+ ...params
10456
+ }, evnt);
10457
+ }
10433
10458
  }
10434
10459
  },
10435
10460
  /**
@@ -10576,7 +10601,7 @@ const Methods = {
10576
10601
  cell
10577
10602
  }, params), evnt);
10578
10603
  if (this.columnOpts.isCurrent || this.highlightCurrentColumn) {
10579
- return this.setCurrentColumn(column);
10604
+ this.triggerCurrentColumnEvent(evnt, params);
10580
10605
  }
10581
10606
  return this.$nextTick();
10582
10607
  },
@@ -26863,17 +26888,50 @@ render_renderer.mixin({
26863
26888
  row,
26864
26889
  column
26865
26890
  } = params;
26866
- const digits = props.digits || render_getConfig().numberInput?.digits || 2;
26891
+ const {
26892
+ type
26893
+ } = props;
26867
26894
  let cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
26868
26895
  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;
26896
+ if (type === 'float') {
26897
+ const digits = props.digits || render_getConfig().numberInput.digits || 1;
26898
+ 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);
26899
+ } else if (type === 'amount') {
26900
+ const digits = props.digits || render_getConfig().numberInput.digits || 2;
26901
+ 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), {
26902
+ digits
26903
+ });
26873
26904
  }
26874
26905
  }
26875
26906
  return getCellLabelVNs(h, renderOpts, params, cellValue);
26876
26907
  },
26908
+ renderTableFooter(h, renderOpts, params) {
26909
+ const {
26910
+ props = {}
26911
+ } = renderOpts;
26912
+ const {
26913
+ row,
26914
+ column,
26915
+ _columnIndex
26916
+ } = params;
26917
+ const {
26918
+ type
26919
+ } = props;
26920
+ // 兼容老模式
26921
+ 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);
26922
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(cellValue)) {
26923
+ if (type === 'float') {
26924
+ const digits = props.digits || render_getConfig().numberInput.digits || 1;
26925
+ 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);
26926
+ } else if (type === 'amount') {
26927
+ const digits = props.digits || render_getConfig().numberInput.digits || 2;
26928
+ 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), {
26929
+ digits
26930
+ });
26931
+ }
26932
+ }
26933
+ return getFuncText(cellValue, 1);
26934
+ },
26877
26935
  renderTableDefault: defaultEditRender,
26878
26936
  renderTableFilter: defaultFilterRender,
26879
26937
  tableFilterDefaultMethod: handleInputFilterMethod
@@ -27260,7 +27318,7 @@ const Toolbar = VxeToolbar;
27260
27318
  impFields: '导入失败,请检查字段名和数据格式是否正确',
27261
27319
  treeNotImp: '树表格不支持导入',
27262
27320
  treeCrossDrag: '只能拖拽第一层级的数据',
27263
- treeDragChild: '父级数据不能拖拽到子级中',
27321
+ treeDragChild: '父级数据不能拖拽到自己的子级中',
27264
27322
  reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
27265
27323
  },
27266
27324
  table: {