vxe-table 3.21.1 → 3.21.2

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 (151) hide show
  1. package/es/locale/lang/ar-EG.js +2 -2
  2. package/es/locale/lang/de-DE.js +2 -2
  3. package/es/locale/lang/en-US.js +2 -2
  4. package/es/locale/lang/es-ES.js +2 -2
  5. package/es/locale/lang/fr-FR.js +2 -2
  6. package/es/locale/lang/hu-HU.js +2 -2
  7. package/es/locale/lang/hy-AM.js +2 -2
  8. package/es/locale/lang/id-ID.js +2 -2
  9. package/es/locale/lang/it-IT.js +2 -2
  10. package/es/locale/lang/ja-JP.js +2 -2
  11. package/es/locale/lang/ko-KR.js +2 -2
  12. package/es/locale/lang/ms-MY.js +2 -2
  13. package/es/locale/lang/nb-NO.js +2 -2
  14. package/es/locale/lang/pt-BR.js +2 -2
  15. package/es/locale/lang/ru-RU.js +2 -2
  16. package/es/locale/lang/th-TH.js +2 -2
  17. package/es/locale/lang/ug-CN.js +2 -2
  18. package/es/locale/lang/uk-UA.js +2 -2
  19. package/es/locale/lang/uz-UZ.js +2 -2
  20. package/es/locale/lang/vi-VN.js +2 -2
  21. package/es/locale/lang/zh-CHT.js +2 -2
  22. package/es/locale/lang/zh-CN.js +2 -2
  23. package/es/style.css +1 -1
  24. package/es/table/module/custom/panel.js +1 -2
  25. package/es/table/module/menu/mixin.js +3 -2
  26. package/es/table/module/validator/mixin.js +4 -4
  27. package/es/table/src/cell.js +1 -1
  28. package/es/table/src/column.js +2 -0
  29. package/es/table/src/columnInfo.js +1 -0
  30. package/es/ui/index.js +1 -1
  31. package/es/ui/src/log.js +1 -1
  32. package/lib/index.umd.js +16 -14
  33. package/lib/index.umd.min.js +1 -1
  34. package/lib/locale/lang/ar-EG.js +2 -2
  35. package/lib/locale/lang/ar-EG.min.js +1 -1
  36. package/lib/locale/lang/ar-EG.umd.js +2 -2
  37. package/lib/locale/lang/de-DE.js +2 -2
  38. package/lib/locale/lang/de-DE.min.js +1 -1
  39. package/lib/locale/lang/de-DE.umd.js +2 -2
  40. package/lib/locale/lang/en-US.js +2 -2
  41. package/lib/locale/lang/en-US.min.js +1 -1
  42. package/lib/locale/lang/en-US.umd.js +2 -2
  43. package/lib/locale/lang/es-ES.js +2 -2
  44. package/lib/locale/lang/es-ES.min.js +1 -1
  45. package/lib/locale/lang/es-ES.umd.js +2 -2
  46. package/lib/locale/lang/fr-FR.js +2 -2
  47. package/lib/locale/lang/fr-FR.min.js +1 -1
  48. package/lib/locale/lang/fr-FR.umd.js +2 -2
  49. package/lib/locale/lang/hu-HU.js +2 -2
  50. package/lib/locale/lang/hu-HU.min.js +1 -1
  51. package/lib/locale/lang/hu-HU.umd.js +2 -2
  52. package/lib/locale/lang/hy-AM.js +2 -2
  53. package/lib/locale/lang/hy-AM.min.js +1 -1
  54. package/lib/locale/lang/hy-AM.umd.js +2 -2
  55. package/lib/locale/lang/id-ID.js +2 -2
  56. package/lib/locale/lang/id-ID.min.js +1 -1
  57. package/lib/locale/lang/id-ID.umd.js +2 -2
  58. package/lib/locale/lang/it-IT.js +2 -2
  59. package/lib/locale/lang/it-IT.min.js +1 -1
  60. package/lib/locale/lang/it-IT.umd.js +2 -2
  61. package/lib/locale/lang/ja-JP.js +2 -2
  62. package/lib/locale/lang/ja-JP.min.js +1 -1
  63. package/lib/locale/lang/ja-JP.umd.js +2 -2
  64. package/lib/locale/lang/ko-KR.js +2 -2
  65. package/lib/locale/lang/ko-KR.min.js +1 -1
  66. package/lib/locale/lang/ko-KR.umd.js +2 -2
  67. package/lib/locale/lang/ms-MY.js +2 -2
  68. package/lib/locale/lang/ms-MY.min.js +1 -1
  69. package/lib/locale/lang/ms-MY.umd.js +2 -2
  70. package/lib/locale/lang/nb-NO.js +2 -2
  71. package/lib/locale/lang/nb-NO.min.js +1 -1
  72. package/lib/locale/lang/nb-NO.umd.js +2 -2
  73. package/lib/locale/lang/pt-BR.js +2 -2
  74. package/lib/locale/lang/pt-BR.min.js +1 -1
  75. package/lib/locale/lang/pt-BR.umd.js +2 -2
  76. package/lib/locale/lang/ru-RU.js +2 -2
  77. package/lib/locale/lang/ru-RU.min.js +1 -1
  78. package/lib/locale/lang/ru-RU.umd.js +2 -2
  79. package/lib/locale/lang/th-TH.js +2 -2
  80. package/lib/locale/lang/th-TH.min.js +1 -1
  81. package/lib/locale/lang/th-TH.umd.js +2 -2
  82. package/lib/locale/lang/ug-CN.js +2 -2
  83. package/lib/locale/lang/ug-CN.min.js +1 -1
  84. package/lib/locale/lang/ug-CN.umd.js +2 -2
  85. package/lib/locale/lang/uk-UA.js +2 -2
  86. package/lib/locale/lang/uk-UA.min.js +1 -1
  87. package/lib/locale/lang/uk-UA.umd.js +2 -2
  88. package/lib/locale/lang/uz-UZ.js +2 -2
  89. package/lib/locale/lang/uz-UZ.min.js +1 -1
  90. package/lib/locale/lang/uz-UZ.umd.js +2 -2
  91. package/lib/locale/lang/vi-VN.js +2 -2
  92. package/lib/locale/lang/vi-VN.min.js +1 -1
  93. package/lib/locale/lang/vi-VN.umd.js +2 -2
  94. package/lib/locale/lang/zh-CHT.js +2 -2
  95. package/lib/locale/lang/zh-CHT.min.js +1 -1
  96. package/lib/locale/lang/zh-CHT.umd.js +2 -2
  97. package/lib/locale/lang/zh-CN.js +2 -2
  98. package/lib/locale/lang/zh-CN.min.js +1 -1
  99. package/lib/locale/lang/zh-CN.umd.js +2 -2
  100. package/lib/style.css +1 -1
  101. package/lib/table/module/custom/panel.js +1 -3
  102. package/lib/table/module/custom/panel.min.js +1 -1
  103. package/lib/table/module/menu/mixin.js +3 -2
  104. package/lib/table/module/menu/mixin.min.js +1 -1
  105. package/lib/table/module/validator/mixin.js +4 -4
  106. package/lib/table/module/validator/mixin.min.js +1 -1
  107. package/lib/table/src/cell.js +1 -1
  108. package/lib/table/src/cell.min.js +1 -1
  109. package/lib/table/src/column.js +2 -0
  110. package/lib/table/src/column.min.js +1 -1
  111. package/lib/table/src/columnInfo.js +1 -0
  112. package/lib/table/src/columnInfo.min.js +1 -1
  113. package/lib/ui/index.js +1 -1
  114. package/lib/ui/index.min.js +1 -1
  115. package/lib/ui/src/log.js +1 -1
  116. package/lib/ui/src/log.min.js +1 -1
  117. package/package.json +2 -2
  118. package/packages/locale/lang/ar-EG.ts +2 -2
  119. package/packages/locale/lang/de-DE.ts +2 -2
  120. package/packages/locale/lang/en-US.ts +2 -2
  121. package/packages/locale/lang/es-ES.ts +2 -2
  122. package/packages/locale/lang/fr-FR.ts +2 -2
  123. package/packages/locale/lang/hu-HU.ts +2 -2
  124. package/packages/locale/lang/hy-AM.ts +2 -2
  125. package/packages/locale/lang/id-ID.ts +2 -2
  126. package/packages/locale/lang/it-IT.ts +2 -2
  127. package/packages/locale/lang/ja-JP.ts +2 -2
  128. package/packages/locale/lang/ko-KR.ts +2 -2
  129. package/packages/locale/lang/ms-MY.ts +2 -2
  130. package/packages/locale/lang/nb-NO.ts +2 -2
  131. package/packages/locale/lang/pt-BR.ts +2 -2
  132. package/packages/locale/lang/ru-RU.ts +2 -2
  133. package/packages/locale/lang/th-TH.ts +2 -2
  134. package/packages/locale/lang/ug-CN.ts +2 -2
  135. package/packages/locale/lang/uk-UA.ts +2 -2
  136. package/packages/locale/lang/uz-UZ.ts +2 -2
  137. package/packages/locale/lang/vi-VN.ts +2 -2
  138. package/packages/locale/lang/zh-CHT.ts +2 -2
  139. package/packages/locale/lang/zh-CN.ts +2 -2
  140. package/packages/table/module/custom/panel.ts +1 -2
  141. package/packages/table/module/menu/mixin.ts +3 -2
  142. package/packages/table/module/validator/mixin.ts +4 -4
  143. package/packages/table/src/cell.ts +1 -1
  144. package/packages/table/src/column.ts +2 -0
  145. package/packages/table/src/columnInfo.ts +1 -0
  146. /package/es/{iconfont.1779447236462.ttf → iconfont.1779778409753.ttf} +0 -0
  147. /package/es/{iconfont.1779447236462.woff → iconfont.1779778409753.woff} +0 -0
  148. /package/es/{iconfont.1779447236462.woff2 → iconfont.1779778409753.woff2} +0 -0
  149. /package/lib/{iconfont.1779447236462.ttf → iconfont.1779778409753.ttf} +0 -0
  150. /package/lib/{iconfont.1779447236462.woff → iconfont.1779778409753.woff} +0 -0
  151. /package/lib/{iconfont.1779447236462.woff2 → iconfont.1779778409753.woff2} +0 -0
@@ -747,10 +747,9 @@ export default {
747
747
  const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
748
748
  const { isCustomStatus, customColumnList, isCustomDragStatus } = tableReactData;
749
749
  const customOpts = $xeTable.computeCustomOpts;
750
- const { immediate } = customOpts;
751
750
  const columnDragOpts = $xeTable.computeColumnDragOpts;
752
751
  const { popupStyle } = customStore;
753
- const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, allowGroup, allowValues, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts;
752
+ const { immediate, checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, allowGroup, allowValues, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts;
754
753
  const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
755
754
  const vSize = $xeTable.computeSize;
756
755
  const { isCrossDrag } = columnDragOpts;
@@ -309,8 +309,9 @@ export default {
309
309
  if (!menu.loading && !menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
310
310
  const gMenuOpts = menus.get(menu.code);
311
311
  const params = Object.assign({}, internalData._currMenuParams, { menu, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, $event: evnt });
312
- if (gMenuOpts && gMenuOpts.menuMethod) {
313
- gMenuOpts.menuMethod(params, evnt);
312
+ const tmMethod = gMenuOpts ? (gMenuOpts.tableMenuMethod || gMenuOpts.menuMethod) : null;
313
+ if (tmMethod) {
314
+ tmMethod(params, evnt);
314
315
  }
315
316
  // 在 v4 中废弃事件 context-menu-click
316
317
  if ($xeTable.$listeners['context-menu-click']) {
@@ -378,9 +378,9 @@ export default {
378
378
  },
379
379
  hasCellRules(type, row, column) {
380
380
  const { editRules } = this;
381
- const { property } = column;
382
- if (property && editRules) {
383
- const rules = XEUtils.get(editRules, property);
381
+ const { field } = column;
382
+ if (field && editRules) {
383
+ const rules = column.rules ? column.rules : XEUtils.get(editRules, field);
384
384
  return rules && XEUtils.find(rules, rule => type === 'all' || !rule.trigger || type === rule.trigger);
385
385
  }
386
386
  return false;
@@ -408,7 +408,7 @@ export default {
408
408
  const errorRules = [];
409
409
  const syncValidList = [];
410
410
  if (field && editRules) {
411
- const rules = XEUtils.get(editRules, field);
411
+ const rules = column.rules ? column.rules : XEUtils.get(editRules, field);
412
412
  if (rules) {
413
413
  const cellValue = XEUtils.isUndefined(val) ? XEUtils.get(row, field) : val;
414
414
  rules.forEach((rule) => {
@@ -1110,7 +1110,7 @@ export const Cell = {
1110
1110
  const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
1111
1111
  let isRequired = false;
1112
1112
  if (editRules) {
1113
- const columnRules = XEUtils.get(editRules, column.field);
1113
+ const columnRules = column.rules ? column.rules : XEUtils.get(editRules, column.field);
1114
1114
  if (columnRules) {
1115
1115
  isRequired = columnRules.some((rule) => rule.required);
1116
1116
  }
@@ -99,6 +99,8 @@ export const columnProps = {
99
99
  filterRender: Object,
100
100
  // 是否显示浮动筛选
101
101
  floatingFilters: Object,
102
+ // 列的校验规则
103
+ rules: Array,
102
104
  // 设置为分组节点
103
105
  rowGroupNode: Boolean,
104
106
  // 设置为树节点
@@ -108,6 +108,7 @@ export class ColumnInfo {
108
108
  filterRecoverMethod: _vm.filterRecoverMethod,
109
109
  filterRender: filterRender,
110
110
  floatingFilters: _vm.floatingFilters,
111
+ rules: _vm.rules,
111
112
  rowGroupNode: _vm.rowGroupNode,
112
113
  treeNode: _vm.treeNode,
113
114
  dragSort: _vm.dragSort,
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.1";
3
+ export const version = "3.21.2";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
package/es/ui/src/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const version = `table v${"3.21.1"}`;
3
+ const version = `table v${"3.21.2"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -3311,7 +3311,7 @@ function getClass(property, params) {
3311
3311
  /* unused harmony import specifier */ var VxeUI;
3312
3312
 
3313
3313
 
3314
- const version = "3.21.1";
3314
+ const version = "3.21.2";
3315
3315
  core_.VxeUI.version = version;
3316
3316
  core_.VxeUI.tableVersion = version;
3317
3317
  core_.VxeUI.setConfig({
@@ -3842,7 +3842,7 @@ var es_iterator_some = __webpack_require__(3579);
3842
3842
  const {
3843
3843
  log: log_log
3844
3844
  } = core_.VxeUI;
3845
- const log_version = `table v${"3.21.1"}`;
3845
+ const log_version = `table v${"3.21.2"}`;
3846
3846
  const warnLog = log_log.create('warn', log_version);
3847
3847
  const errLog = log_log.create('error', log_version);
3848
3848
  ;// ./packages/table/src/columnInfo.ts
@@ -3971,6 +3971,7 @@ class ColumnInfo {
3971
3971
  filterRecoverMethod: _vm.filterRecoverMethod,
3972
3972
  filterRender: filterRender,
3973
3973
  floatingFilters: _vm.floatingFilters,
3974
+ rules: _vm.rules,
3974
3975
  rowGroupNode: _vm.rowGroupNode,
3975
3976
  treeNode: _vm.treeNode,
3976
3977
  dragSort: _vm.dragSort,
@@ -6779,7 +6780,7 @@ const Cell = {
6779
6780
  const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
6780
6781
  let isRequired = false;
6781
6782
  if (editRules) {
6782
- const columnRules = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, column.field);
6783
+ const columnRules = column.rules ? column.rules : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, column.field);
6783
6784
  if (columnRules) {
6784
6785
  isRequired = columnRules.some(rule => rule.required);
6785
6786
  }
@@ -7033,6 +7034,8 @@ const columnProps = {
7033
7034
  filterRender: Object,
7034
7035
  // 是否显示浮动筛选
7035
7036
  floatingFilters: Object,
7037
+ // 列的校验规则
7038
+ rules: Array,
7036
7039
  // 设置为分组节点
7037
7040
  rowGroupNode: Boolean,
7038
7041
  // 设置为树节点
@@ -11405,14 +11408,12 @@ function panel_hideDropTip($xeTableCustomPanel) {
11405
11408
  isCustomDragStatus
11406
11409
  } = tableReactData;
11407
11410
  const customOpts = $xeTable.computeCustomOpts;
11408
- const {
11409
- immediate
11410
- } = customOpts;
11411
11411
  const columnDragOpts = $xeTable.computeColumnDragOpts;
11412
11412
  const {
11413
11413
  popupStyle
11414
11414
  } = customStore;
11415
11415
  const {
11416
+ immediate,
11416
11417
  checkMethod,
11417
11418
  visibleMethod,
11418
11419
  allowVisible,
@@ -14482,8 +14483,9 @@ const {
14482
14483
  $gantt: $xeGantt,
14483
14484
  $event: evnt
14484
14485
  });
14485
- if (gMenuOpts && gMenuOpts.menuMethod) {
14486
- gMenuOpts.menuMethod(params, evnt);
14486
+ const tmMethod = gMenuOpts ? gMenuOpts.tableMenuMethod || gMenuOpts.menuMethod : null;
14487
+ if (tmMethod) {
14488
+ tmMethod(params, evnt);
14487
14489
  }
14488
14490
  // 在 v4 中废弃事件 context-menu-click
14489
14491
  if ($xeTable.$listeners['context-menu-click']) {
@@ -18839,10 +18841,10 @@ function beginValidate($xeTable, rows, cols, cb, isFull) {
18839
18841
  editRules
18840
18842
  } = this;
18841
18843
  const {
18842
- property
18844
+ field
18843
18845
  } = column;
18844
- if (property && editRules) {
18845
- const rules = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, property);
18846
+ if (field && editRules) {
18847
+ const rules = column.rules ? column.rules : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, field);
18846
18848
  return rules && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().find(rules, rule => type === 'all' || !rule.trigger || type === rule.trigger);
18847
18849
  }
18848
18850
  return false;
@@ -18874,7 +18876,7 @@ function beginValidate($xeTable, rows, cols, cb, isFull) {
18874
18876
  const errorRules = [];
18875
18877
  const syncValidList = [];
18876
18878
  if (field && editRules) {
18877
- const rules = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, field);
18879
+ const rules = column.rules ? column.rules : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, field);
18878
18880
  if (rules) {
18879
18881
  const cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(val) ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, field) : val;
18880
18882
  rules.forEach(rule => {
@@ -27064,7 +27066,7 @@ const Toolbar = VxeToolbar;
27064
27066
  cstmDragTarget: '移动:{0}',
27065
27067
  setting: {
27066
27068
  colSort: '排序',
27067
- sortHelpTip: '点击并拖动图标可以调整顺序',
27069
+ sortHelpTip: '点击图标开始拖动',
27068
27070
  colTitle: '列标题',
27069
27071
  colResizable: '列宽(像素)',
27070
27072
  colVisible: '是否显示',
@@ -27550,7 +27552,7 @@ const Toolbar = VxeToolbar;
27550
27552
  groupPlaceholder: '拖至此处进行分组',
27551
27553
  valuesPlaceholder: '拖至此处进行聚合',
27552
27554
  dragExistCol: '该列已存在',
27553
- sortHelpTip: '点击并拖动图标可以调整顺序'
27555
+ sortHelpTip: '点击图标开始拖动'
27554
27556
  },
27555
27557
  aggFuncs: {
27556
27558
  sum: '求和',