vxe-table 4.19.1 → 4.19.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 (150) hide show
  1. package/dist/all.esm.js +31751 -0
  2. package/dist/style.css +1 -0
  3. package/dist/style.min.css +1 -0
  4. package/es/locale/lang/ar-EG.js +2 -2
  5. package/es/locale/lang/de-DE.js +2 -2
  6. package/es/locale/lang/en-US.js +2 -2
  7. package/es/locale/lang/es-ES.js +2 -2
  8. package/es/locale/lang/fr-FR.js +2 -2
  9. package/es/locale/lang/hu-HU.js +2 -2
  10. package/es/locale/lang/hy-AM.js +2 -2
  11. package/es/locale/lang/id-ID.js +2 -2
  12. package/es/locale/lang/it-IT.js +2 -2
  13. package/es/locale/lang/ja-JP.js +2 -2
  14. package/es/locale/lang/ko-KR.js +2 -2
  15. package/es/locale/lang/ms-MY.js +2 -2
  16. package/es/locale/lang/nb-NO.js +2 -2
  17. package/es/locale/lang/pt-BR.js +2 -2
  18. package/es/locale/lang/ru-RU.js +2 -2
  19. package/es/locale/lang/th-TH.js +2 -2
  20. package/es/locale/lang/ug-CN.js +2 -2
  21. package/es/locale/lang/uk-UA.js +2 -2
  22. package/es/locale/lang/uz-UZ.js +2 -2
  23. package/es/locale/lang/vi-VN.js +2 -2
  24. package/es/locale/lang/zh-CHT.js +2 -2
  25. package/es/locale/lang/zh-CN.js +2 -2
  26. package/es/style.css +1 -1
  27. package/es/table/module/custom/panel.js +1 -2
  28. package/es/table/module/validator/hook.js +2 -2
  29. package/es/table/src/cell.js +1 -1
  30. package/es/table/src/column.js +2 -0
  31. package/es/table/src/columnInfo.js +1 -0
  32. package/es/ui/index.js +1 -1
  33. package/es/ui/src/log.js +1 -1
  34. package/lib/index.umd.js +11 -10
  35. package/lib/index.umd.min.js +1 -1
  36. package/lib/locale/lang/ar-EG.js +2 -2
  37. package/lib/locale/lang/ar-EG.min.js +1 -1
  38. package/lib/locale/lang/ar-EG.umd.js +2 -2
  39. package/lib/locale/lang/de-DE.js +2 -2
  40. package/lib/locale/lang/de-DE.min.js +1 -1
  41. package/lib/locale/lang/de-DE.umd.js +2 -2
  42. package/lib/locale/lang/en-US.js +2 -2
  43. package/lib/locale/lang/en-US.min.js +1 -1
  44. package/lib/locale/lang/en-US.umd.js +2 -2
  45. package/lib/locale/lang/es-ES.js +2 -2
  46. package/lib/locale/lang/es-ES.min.js +1 -1
  47. package/lib/locale/lang/es-ES.umd.js +2 -2
  48. package/lib/locale/lang/fr-FR.js +2 -2
  49. package/lib/locale/lang/fr-FR.min.js +1 -1
  50. package/lib/locale/lang/fr-FR.umd.js +2 -2
  51. package/lib/locale/lang/hu-HU.js +2 -2
  52. package/lib/locale/lang/hu-HU.min.js +1 -1
  53. package/lib/locale/lang/hu-HU.umd.js +2 -2
  54. package/lib/locale/lang/hy-AM.js +2 -2
  55. package/lib/locale/lang/hy-AM.min.js +1 -1
  56. package/lib/locale/lang/hy-AM.umd.js +2 -2
  57. package/lib/locale/lang/id-ID.js +2 -2
  58. package/lib/locale/lang/id-ID.min.js +1 -1
  59. package/lib/locale/lang/id-ID.umd.js +2 -2
  60. package/lib/locale/lang/it-IT.js +2 -2
  61. package/lib/locale/lang/it-IT.min.js +1 -1
  62. package/lib/locale/lang/it-IT.umd.js +2 -2
  63. package/lib/locale/lang/ja-JP.js +2 -2
  64. package/lib/locale/lang/ja-JP.min.js +1 -1
  65. package/lib/locale/lang/ja-JP.umd.js +2 -2
  66. package/lib/locale/lang/ko-KR.js +2 -2
  67. package/lib/locale/lang/ko-KR.min.js +1 -1
  68. package/lib/locale/lang/ko-KR.umd.js +2 -2
  69. package/lib/locale/lang/ms-MY.js +2 -2
  70. package/lib/locale/lang/ms-MY.min.js +1 -1
  71. package/lib/locale/lang/ms-MY.umd.js +2 -2
  72. package/lib/locale/lang/nb-NO.js +2 -2
  73. package/lib/locale/lang/nb-NO.min.js +1 -1
  74. package/lib/locale/lang/nb-NO.umd.js +2 -2
  75. package/lib/locale/lang/pt-BR.js +2 -2
  76. package/lib/locale/lang/pt-BR.min.js +1 -1
  77. package/lib/locale/lang/pt-BR.umd.js +2 -2
  78. package/lib/locale/lang/ru-RU.js +2 -2
  79. package/lib/locale/lang/ru-RU.min.js +1 -1
  80. package/lib/locale/lang/ru-RU.umd.js +2 -2
  81. package/lib/locale/lang/th-TH.js +2 -2
  82. package/lib/locale/lang/th-TH.min.js +1 -1
  83. package/lib/locale/lang/th-TH.umd.js +2 -2
  84. package/lib/locale/lang/ug-CN.js +2 -2
  85. package/lib/locale/lang/ug-CN.min.js +1 -1
  86. package/lib/locale/lang/ug-CN.umd.js +2 -2
  87. package/lib/locale/lang/uk-UA.js +2 -2
  88. package/lib/locale/lang/uk-UA.min.js +1 -1
  89. package/lib/locale/lang/uk-UA.umd.js +2 -2
  90. package/lib/locale/lang/uz-UZ.js +2 -2
  91. package/lib/locale/lang/uz-UZ.min.js +1 -1
  92. package/lib/locale/lang/uz-UZ.umd.js +2 -2
  93. package/lib/locale/lang/vi-VN.js +2 -2
  94. package/lib/locale/lang/vi-VN.min.js +1 -1
  95. package/lib/locale/lang/vi-VN.umd.js +2 -2
  96. package/lib/locale/lang/zh-CHT.js +2 -2
  97. package/lib/locale/lang/zh-CHT.min.js +1 -1
  98. package/lib/locale/lang/zh-CHT.umd.js +2 -2
  99. package/lib/locale/lang/zh-CN.js +2 -2
  100. package/lib/locale/lang/zh-CN.min.js +1 -1
  101. package/lib/locale/lang/zh-CN.umd.js +2 -2
  102. package/lib/style.css +1 -1
  103. package/lib/table/module/custom/panel.js +1 -3
  104. package/lib/table/module/custom/panel.min.js +1 -1
  105. package/lib/table/module/validator/hook.js +2 -2
  106. package/lib/table/module/validator/hook.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 +5 -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/validator/hook.ts +2 -2
  142. package/packages/table/src/cell.ts +1 -1
  143. package/packages/table/src/column.ts +2 -0
  144. package/packages/table/src/columnInfo.ts +1 -0
  145. /package/es/{iconfont.1779447258442.ttf → iconfont.1779778422561.ttf} +0 -0
  146. /package/es/{iconfont.1779447258442.woff → iconfont.1779778422561.woff} +0 -0
  147. /package/es/{iconfont.1779447258442.woff2 → iconfont.1779778422561.woff2} +0 -0
  148. /package/lib/{iconfont.1779447258442.ttf → iconfont.1779778422561.ttf} +0 -0
  149. /package/lib/{iconfont.1779447258442.woff → iconfont.1779778422561.woff} +0 -0
  150. /package/lib/{iconfont.1779447258442.woff2 → iconfont.1779778422561.woff2} +0 -0
@@ -648,10 +648,9 @@ export default defineVxeComponent({
648
648
  const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
649
649
  const { isCustomStatus, customColumnList, isCustomDragStatus } = tableReactData;
650
650
  const customOpts = computeCustomOpts.value;
651
- const { immediate } = customOpts;
652
651
  const columnDragOpts = computeColumnDragOpts.value;
653
652
  const { popupStyle } = customStore;
654
- const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, allowGroup, allowValues, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts;
653
+ const { immediate, checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, allowGroup, allowValues, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts;
655
654
  const isMaxFixedColumn = computeIsMaxFixedColumn.value;
656
655
  const vSize = computeSize.value;
657
656
  const { isCrossDrag } = columnDragOpts;
@@ -440,7 +440,7 @@ hooks.add('tableValidatorModule', {
440
440
  const errorRules = [];
441
441
  const syncValidList = [];
442
442
  if (field && editRules) {
443
- const rules = XEUtils.get(editRules, field);
443
+ const rules = column.rules ? column.rules : XEUtils.get(editRules, field);
444
444
  if (rules) {
445
445
  const cellValue = XEUtils.isUndefined(val) ? XEUtils.get(row, field) : val;
446
446
  rules.forEach((rule) => {
@@ -514,7 +514,7 @@ hooks.add('tableValidatorModule', {
514
514
  const { editRules } = props;
515
515
  const { field } = column;
516
516
  if (field && editRules) {
517
- const rules = XEUtils.get(editRules, field);
517
+ const rules = column.rules ? column.rules : XEUtils.get(editRules, field);
518
518
  return rules && !!XEUtils.find(rules, rule => type === 'all' || !rule.trigger || type === rule.trigger);
519
519
  }
520
520
  return false;
@@ -1089,7 +1089,7 @@ export const Cell = {
1089
1089
  const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
1090
1090
  let isRequired = false;
1091
1091
  if (editRules) {
1092
- const columnRules = XEUtils.get(editRules, column.field);
1092
+ const columnRules = column.rules ? column.rules : XEUtils.get(editRules, column.field);
1093
1093
  if (columnRules) {
1094
1094
  isRequired = columnRules.some((rule) => rule.required);
1095
1095
  }
@@ -93,6 +93,8 @@ export const columnProps = {
93
93
  filterRender: Object,
94
94
  // 是否显示浮动筛选
95
95
  floatingFilters: Object,
96
+ // 列的校验规则
97
+ rules: Array,
96
98
  // 设置为分组节点
97
99
  rowGroupNode: Boolean,
98
100
  // 设置为树节点
@@ -101,6 +101,7 @@ export class ColumnInfo {
101
101
  filterRecoverMethod: _vm.filterRecoverMethod,
102
102
  filterRender: filterRender,
103
103
  floatingFilters: _vm.floatingFilters,
104
+ rules: _vm.rules,
104
105
  rowGroupNode: _vm.rowGroupNode,
105
106
  treeNode: _vm.treeNode,
106
107
  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 = "4.19.1";
3
+ export const version = "4.19.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${"4.19.1"}`;
3
+ const version = `table v${"4.19.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
@@ -3314,7 +3314,7 @@ function getDefaultConfig(val1, def1) {
3314
3314
  /* unused harmony import specifier */ var VxeUI;
3315
3315
 
3316
3316
 
3317
- const version = "4.19.1";
3317
+ const version = "4.19.2";
3318
3318
  core_.VxeUI.version = version;
3319
3319
  core_.VxeUI.tableVersion = version;
3320
3320
  core_.VxeUI.setConfig({
@@ -3848,7 +3848,7 @@ var es_iterator_some = __webpack_require__(3579);
3848
3848
  const {
3849
3849
  log: log_log
3850
3850
  } = core_.VxeUI;
3851
- const log_version = `table v${"4.19.1"}`;
3851
+ const log_version = `table v${"4.19.2"}`;
3852
3852
  const warnLog = log_log.create('warn', log_version);
3853
3853
  const errLog = log_log.create('error', log_version);
3854
3854
  ;// ./packages/table/src/columnInfo.ts
@@ -3972,6 +3972,7 @@ class ColumnInfo {
3972
3972
  filterRecoverMethod: _vm.filterRecoverMethod,
3973
3973
  filterRender: filterRender,
3974
3974
  floatingFilters: _vm.floatingFilters,
3975
+ rules: _vm.rules,
3975
3976
  rowGroupNode: _vm.rowGroupNode,
3976
3977
  treeNode: _vm.treeNode,
3977
3978
  dragSort: _vm.dragSort,
@@ -6913,7 +6914,7 @@ const Cell = {
6913
6914
  const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
6914
6915
  let isRequired = false;
6915
6916
  if (editRules) {
6916
- const columnRules = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, column.field);
6917
+ const columnRules = column.rules ? column.rules : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, column.field);
6917
6918
  if (columnRules) {
6918
6919
  isRequired = columnRules.some(rule => rule.required);
6919
6920
  }
@@ -7161,6 +7162,8 @@ const columnProps = {
7161
7162
  filterRender: Object,
7162
7163
  // 是否显示浮动筛选
7163
7164
  floatingFilters: Object,
7165
+ // 列的校验规则
7166
+ rules: Array,
7164
7167
  // 设置为分组节点
7165
7168
  rowGroupNode: Boolean,
7166
7169
  // 设置为树节点
@@ -10524,14 +10527,12 @@ function panel_createInternalData() {
10524
10527
  isCustomDragStatus
10525
10528
  } = tableReactData;
10526
10529
  const customOpts = computeCustomOpts.value;
10527
- const {
10528
- immediate
10529
- } = customOpts;
10530
10530
  const columnDragOpts = computeColumnDragOpts.value;
10531
10531
  const {
10532
10532
  popupStyle
10533
10533
  } = customStore;
10534
10534
  const {
10535
+ immediate,
10535
10536
  checkMethod,
10536
10537
  visibleMethod,
10537
10538
  allowVisible,
@@ -17666,7 +17667,7 @@ validator_hook_hooks.add('tableValidatorModule', {
17666
17667
  const errorRules = [];
17667
17668
  const syncValidList = [];
17668
17669
  if (field && editRules) {
17669
- const rules = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, field);
17670
+ const rules = column.rules ? column.rules : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, field);
17670
17671
  if (rules) {
17671
17672
  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;
17672
17673
  rules.forEach(rule => {
@@ -17755,7 +17756,7 @@ validator_hook_hooks.add('tableValidatorModule', {
17755
17756
  field
17756
17757
  } = column;
17757
17758
  if (field && editRules) {
17758
- const rules = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, field);
17759
+ const rules = column.rules ? column.rules : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, field);
17759
17760
  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);
17760
17761
  }
17761
17762
  return false;
@@ -23994,7 +23995,7 @@ const Toolbar = VxeToolbar;
23994
23995
  cstmDragTarget: '移动:{0}',
23995
23996
  setting: {
23996
23997
  colSort: '排序',
23997
- sortHelpTip: '点击并拖动图标可以调整顺序',
23998
+ sortHelpTip: '点击图标开始拖动',
23998
23999
  colTitle: '列标题',
23999
24000
  colResizable: '列宽(像素)',
24000
24001
  colVisible: '是否显示',
@@ -24480,7 +24481,7 @@ const Toolbar = VxeToolbar;
24480
24481
  groupPlaceholder: '拖至此处进行分组',
24481
24482
  valuesPlaceholder: '拖至此处进行聚合',
24482
24483
  dragExistCol: '该列已存在',
24483
- sortHelpTip: '点击并拖动图标可以调整顺序'
24484
+ sortHelpTip: '点击图标开始拖动'
24484
24485
  },
24485
24486
  aggFuncs: {
24486
24487
  sum: '求和',