vxe-table 4.13.29 → 4.13.30

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 (37) hide show
  1. package/es/grid/src/grid.js +25 -26
  2. package/es/style.css +1 -1
  3. package/es/table/module/edit/hook.js +11 -27
  4. package/es/table/module/export/hook.js +15 -20
  5. package/es/table/module/validator/hook.js +104 -44
  6. package/es/table/src/table.js +7 -21
  7. package/es/ui/index.js +1 -1
  8. package/es/ui/src/log.js +1 -1
  9. package/lib/grid/src/grid.js +25 -26
  10. package/lib/grid/src/grid.min.js +1 -1
  11. package/lib/index.umd.js +166 -131
  12. package/lib/index.umd.min.js +1 -1
  13. package/lib/style.css +1 -1
  14. package/lib/table/module/edit/hook.js +11 -27
  15. package/lib/table/module/edit/hook.min.js +1 -1
  16. package/lib/table/module/export/hook.js +15 -20
  17. package/lib/table/module/export/hook.min.js +1 -1
  18. package/lib/table/module/validator/hook.js +106 -47
  19. package/lib/table/module/validator/hook.min.js +1 -1
  20. package/lib/table/src/table.js +7 -9
  21. package/lib/table/src/table.min.js +1 -1
  22. package/lib/ui/index.js +1 -1
  23. package/lib/ui/index.min.js +1 -1
  24. package/lib/ui/src/log.js +1 -1
  25. package/lib/ui/src/log.min.js +1 -1
  26. package/package.json +1 -1
  27. package/packages/grid/src/grid.ts +25 -27
  28. package/packages/table/module/edit/hook.ts +11 -27
  29. package/packages/table/module/export/hook.ts +17 -22
  30. package/packages/table/module/validator/hook.ts +106 -43
  31. package/packages/table/src/table.ts +7 -21
  32. /package/es/{iconfont.1747286444797.ttf → iconfont.1747357348072.ttf} +0 -0
  33. /package/es/{iconfont.1747286444797.woff → iconfont.1747357348072.woff} +0 -0
  34. /package/es/{iconfont.1747286444797.woff2 → iconfont.1747357348072.woff2} +0 -0
  35. /package/lib/{iconfont.1747286444797.ttf → iconfont.1747357348072.ttf} +0 -0
  36. /package/lib/{iconfont.1747286444797.woff → iconfont.1747357348072.woff} +0 -0
  37. /package/lib/{iconfont.1747286444797.woff2 → iconfont.1747357348072.woff2} +0 -0
@@ -82,10 +82,8 @@ hooks.add('tableEditModule', {
82
82
  fullAllDataRowIdData[rowid] = rest;
83
83
  }
84
84
  else {
85
- if (process.env.NODE_ENV === 'development') {
86
- if (parentRowId) {
87
- warnLog('vxe.error.unableInsert');
88
- }
85
+ if (parentRowId) {
86
+ warnLog('vxe.error.unableInsert');
89
87
  }
90
88
  afterFullData[funcName](item);
91
89
  tableFullTreeData[funcName](item);
@@ -163,11 +161,9 @@ hooks.add('tableEditModule', {
163
161
  const parentLevel = parentRest ? parentRest.level : 0;
164
162
  newRecords.forEach((item, i) => {
165
163
  const rowid = getRowid($xeTable, item);
166
- if (process.env.NODE_ENV === 'development') {
167
- if (item[treeOpts.parentField]) {
168
- if (parentRow && item[treeOpts.parentField] !== parentRow[rowField]) {
169
- errLog('vxe.error.errProp', [`${treeOpts.parentField}=${item[treeOpts.parentField]}`, `${treeOpts.parentField}=${parentRow[rowField]}`]);
170
- }
164
+ if (item[treeOpts.parentField]) {
165
+ if (parentRow && item[treeOpts.parentField] !== parentRow[rowField]) {
166
+ errLog('vxe.error.errProp', [`${treeOpts.parentField}=${item[treeOpts.parentField]}`, `${treeOpts.parentField}=${parentRow[rowField]}`]);
171
167
  }
172
168
  }
173
169
  if (parentRow) {
@@ -196,9 +192,7 @@ hooks.add('tableEditModule', {
196
192
  }
197
193
  }
198
194
  else {
199
- if (process.env.NODE_ENV === 'development') {
200
- warnLog('vxe.error.unableInsert');
201
- }
195
+ warnLog('vxe.error.unableInsert');
202
196
  insertTreeRow(newRecords, true);
203
197
  }
204
198
  }
@@ -695,9 +689,7 @@ hooks.add('tableEditModule', {
695
689
  return [];
696
690
  },
697
691
  getActiveRecord() {
698
- if (process.env.NODE_ENV === 'development') {
699
- warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord']);
700
- }
692
+ warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord']);
701
693
  return $xeTable.getEditRecord();
702
694
  },
703
695
  getEditRecord() {
@@ -723,9 +715,7 @@ hooks.add('tableEditModule', {
723
715
  },
724
716
  clearActived(row) {
725
717
  // 即将废弃
726
- if (process.env.NODE_ENV === 'development') {
727
- warnLog('vxe.error.delFunc', ['clearActived', 'clearEdit']);
728
- }
718
+ warnLog('vxe.error.delFunc', ['clearActived', 'clearEdit']);
729
719
  return $xeTable.clearEdit(row);
730
720
  },
731
721
  /**
@@ -746,9 +736,7 @@ hooks.add('tableEditModule', {
746
736
  return nextTick();
747
737
  },
748
738
  isActiveByRow(row) {
749
- if (process.env.NODE_ENV === 'development') {
750
- warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow']);
751
- }
739
+ warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow']);
752
740
  // 即将废弃
753
741
  return $xeTable.isEditByRow(row);
754
742
  },
@@ -761,9 +749,7 @@ hooks.add('tableEditModule', {
761
749
  return editStore.actived.row === row;
762
750
  },
763
751
  setActiveRow(row) {
764
- if (process.env.NODE_ENV === 'development') {
765
- warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow']);
766
- }
752
+ warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow']);
767
753
  // 即将废弃
768
754
  return editMethods.setEditRow(row);
769
755
  },
@@ -783,9 +769,7 @@ hooks.add('tableEditModule', {
783
769
  return handleEditCell(row, column, isPos);
784
770
  },
785
771
  setActiveCell(row, fieldOrColumn) {
786
- if (process.env.NODE_ENV === 'development') {
787
- warnLog('vxe.error.delFunc', ['setActiveCell', 'setEditCell']);
788
- }
772
+ warnLog('vxe.error.delFunc', ['setActiveCell', 'setEditCell']);
789
773
  // 即将废弃
790
774
  return editMethods.setEditCell(row, fieldOrColumn);
791
775
  },
@@ -11,7 +11,7 @@ let htmlCellElem;
11
11
  const csvBOM = '\ufeff';
12
12
  const enterSymbol = '\r\n';
13
13
  function defaultFilterExportColumn(column) {
14
- return column.field || ['seq', 'checkbox', 'radio'].indexOf(column.type) > -1;
14
+ return !!column.field || ['seq', 'checkbox', 'radio'].indexOf(column.type || '') > -1;
15
15
  }
16
16
  const getConvertColumns = (columns) => {
17
17
  const result = [];
@@ -951,7 +951,7 @@ hooks.add('tableExportModule', {
951
951
  }
952
952
  return false;
953
953
  }
954
- return exportOpts.original ? column.field : defaultFilterExportColumn(column);
954
+ return exportOpts.original ? !!column.field : defaultFilterExportColumn(column);
955
955
  };
956
956
  const handleExportAndPrint = (options, isPrint) => {
957
957
  const { treeConfig, showHeader, showFooter } = props;
@@ -1001,7 +1001,7 @@ hooks.add('tableExportModule', {
1001
1001
  });
1002
1002
  // 默认选中
1003
1003
  XEUtils.eachTree(exportColumns, (column, index, items, path, parent) => {
1004
- const isColGroup = column.children && column.children.length;
1004
+ const isColGroup = column.children && column.children.length > 0;
1005
1005
  let isChecked = false;
1006
1006
  if (columns && columns.length) {
1007
1007
  isChecked = handleFilterColumns(defOpts, column, columns);
@@ -1121,7 +1121,7 @@ hooks.add('tableExportModule', {
1121
1121
  const customCols = columns && columns.length
1122
1122
  ? columns
1123
1123
  : XEUtils.searchTree(collectColumn, column => {
1124
- const isColGroup = column.children && column.children.length;
1124
+ const isColGroup = column.children && column.children.length > 0;
1125
1125
  let isChecked = false;
1126
1126
  if (columns && columns.length) {
1127
1127
  isChecked = handleFilterColumns(opts, column, columns);
@@ -1137,7 +1137,7 @@ hooks.add('tableExportModule', {
1137
1137
  const handleOptions = Object.assign({}, opts, { filename: '', sheetName: '' });
1138
1138
  // 如果设置源数据,则默认导出设置了字段的列
1139
1139
  if (!customCols && !columnFilterMethod) {
1140
- handleOptions.columnFilterMethod = ({ column }) => {
1140
+ columnFilterMethod = ({ column }) => {
1141
1141
  if (excludeFields) {
1142
1142
  if (XEUtils.includes(excludeFields, column.field)) {
1143
1143
  return false;
@@ -1149,8 +1149,9 @@ hooks.add('tableExportModule', {
1149
1149
  }
1150
1150
  return false;
1151
1151
  }
1152
- return original ? column.field : defaultFilterExportColumn(column);
1152
+ return original ? !!column.field : defaultFilterExportColumn(column);
1153
1153
  };
1154
+ handleOptions.columnFilterMethod = columnFilterMethod;
1154
1155
  }
1155
1156
  if (customCols) {
1156
1157
  handleOptions._isCustomColumn = true;
@@ -1238,10 +1239,8 @@ hooks.add('tableExportModule', {
1238
1239
  // 检查类型,如果为自定义导出,则不需要校验类型
1239
1240
  if (!handleOptions.exportMethod && !XEUtils.includes(XEUtils.keys(exportOpts._typeMaps), type)) {
1240
1241
  errLog('vxe.error.notType', [type]);
1241
- if (process.env.NODE_ENV === 'development') {
1242
- if (['xlsx', 'pdf'].includes(type)) {
1243
- warnLog('vxe.error.reqPlugin', [4, 'plugin-export-xlsx']);
1244
- }
1242
+ if (['xlsx', 'pdf'].includes(type)) {
1243
+ warnLog('vxe.error.reqPlugin', [4, 'plugin-export-xlsx']);
1245
1244
  }
1246
1245
  const params = { status: false };
1247
1246
  return Promise.reject(params);
@@ -1262,10 +1261,8 @@ hooks.add('tableExportModule', {
1262
1261
  }
1263
1262
  }
1264
1263
  else if (mode === 'all') {
1265
- if (process.env.NODE_ENV === 'development') {
1266
- if (!$xeGrid) {
1267
- warnLog('vxe.error.errProp', ['all', 'mode=current,selected']);
1268
- }
1264
+ if (!$xeGrid) {
1265
+ errLog('vxe.error.errProp', ['all', 'mode=current,selected']);
1269
1266
  }
1270
1267
  if ($xeGrid && !handleOptions.remote) {
1271
1268
  const gridReactData = $xeGrid.reactData;
@@ -1277,10 +1274,8 @@ hooks.add('tableExportModule', {
1277
1274
  const ajaxMethods = ajax.queryAll;
1278
1275
  const queryAllSuccessMethods = ajax.queryAllSuccess;
1279
1276
  const queryAllErrorMethods = ajax.queryAllError;
1280
- if (process.env.NODE_ENV === 'development') {
1281
- if (!ajaxMethods) {
1282
- warnLog('vxe.error.notFunc', ['proxy-config.ajax.queryAll']);
1283
- }
1277
+ if (!ajaxMethods) {
1278
+ errLog('vxe.error.notFunc', ['proxy-config.ajax.queryAll']);
1284
1279
  }
1285
1280
  if (ajaxMethods) {
1286
1281
  const params = {
@@ -1518,7 +1513,7 @@ hooks.add('tableExportModule', {
1518
1513
  if (!props.exportConfig) {
1519
1514
  errLog('vxe.error.reqProp', ['export-config']);
1520
1515
  }
1521
- handleExportAndPrint(defOpts);
1516
+ return handleExportAndPrint(defOpts);
1522
1517
  },
1523
1518
  closePrint: handleCloseExport,
1524
1519
  openPrint(options) {
@@ -1529,7 +1524,7 @@ hooks.add('tableExportModule', {
1529
1524
  if (!props.printConfig) {
1530
1525
  errLog('vxe.error.reqProp', ['print-config']);
1531
1526
  }
1532
- handleExportAndPrint(defOpts, true);
1527
+ return handleExportAndPrint(defOpts, true);
1533
1528
  }
1534
1529
  };
1535
1530
  return exportMethods;
@@ -1,7 +1,7 @@
1
1
  import { nextTick } from 'vue';
2
2
  import XEUtils from 'xe-utils';
3
3
  import { VxeUI } from '../../../ui';
4
- import { getFuncText, eqEmptyValue } from '../../../ui/src/utils';
4
+ import { getFuncText } from '../../../ui/src/utils';
5
5
  import { scrollToView } from '../../../ui/src/dom';
6
6
  import { handleFieldOrColumn, getRowid } from '../../src/util';
7
7
  import { warnLog, errLog } from '../../../ui/src/log';
@@ -34,6 +34,104 @@ class Rule {
34
34
  return this.content;
35
35
  }
36
36
  }
37
+ // 如果存在 pattern,判断正则
38
+ function validREValue(pattern, val) {
39
+ if (pattern && !(XEUtils.isRegExp(pattern) ? pattern : new RegExp(pattern)).test(val)) {
40
+ return false;
41
+ }
42
+ return true;
43
+ }
44
+ // 如果存在 max,判断最大值
45
+ function validMaxValue(max, num) {
46
+ if (!XEUtils.eqNull(max) && num > XEUtils.toNumber(max)) {
47
+ return false;
48
+ }
49
+ return true;
50
+ }
51
+ // 如果存在 min,判断最小值
52
+ function validMinValue(min, num) {
53
+ if (!XEUtils.eqNull(min) && num < XEUtils.toNumber(min)) {
54
+ return false;
55
+ }
56
+ return true;
57
+ }
58
+ function validRuleValue(rule, val, required) {
59
+ const { type, min, max, pattern } = rule;
60
+ const isArrType = type === 'array';
61
+ const isNumType = type === 'number';
62
+ const isStrType = type === 'string';
63
+ const strVal = `${val}`;
64
+ if (!validREValue(pattern, strVal)) {
65
+ return false;
66
+ }
67
+ if (isArrType) {
68
+ if (!XEUtils.isArray(val)) {
69
+ return false;
70
+ }
71
+ if (required) {
72
+ if (!val.length) {
73
+ return false;
74
+ }
75
+ }
76
+ if (!validMinValue(min, val.length)) {
77
+ return false;
78
+ }
79
+ if (!validMaxValue(max, val.length)) {
80
+ return false;
81
+ }
82
+ }
83
+ else if (isNumType) {
84
+ const numVal = Number(val);
85
+ if (isNaN(numVal)) {
86
+ return false;
87
+ }
88
+ if (!validMinValue(min, numVal)) {
89
+ return false;
90
+ }
91
+ if (!validMaxValue(max, numVal)) {
92
+ return false;
93
+ }
94
+ }
95
+ else {
96
+ if (isStrType) {
97
+ if (!XEUtils.isString(val)) {
98
+ return false;
99
+ }
100
+ }
101
+ if (required) {
102
+ if (!strVal) {
103
+ return false;
104
+ }
105
+ }
106
+ if (!validMinValue(min, strVal.length)) {
107
+ return false;
108
+ }
109
+ if (!validMaxValue(max, strVal.length)) {
110
+ return false;
111
+ }
112
+ }
113
+ return true;
114
+ }
115
+ function checkRuleStatus(rule, val) {
116
+ const { required } = rule;
117
+ const isEmptyVal = XEUtils.eqNull(val);
118
+ if (required) {
119
+ if (isEmptyVal) {
120
+ return false;
121
+ }
122
+ if (!validRuleValue(rule, val, required)) {
123
+ return false;
124
+ }
125
+ }
126
+ else {
127
+ if (!isEmptyVal) {
128
+ if (!validRuleValue(rule, val, required)) {
129
+ return false;
130
+ }
131
+ }
132
+ }
133
+ return true;
134
+ }
37
135
  const tableValidatorMethodKeys = ['fullValidate', 'validate', 'fullValidateField', 'validateField', 'clearValidate'];
38
136
  hooks.add('tableValidatorModule', {
39
137
  setupTable($xeTable) {
@@ -234,10 +332,8 @@ hooks.add('tableValidatorModule', {
234
332
  * 完整校验行,和 validate 的区别就是会给有效数据中的每一行进行校验
235
333
  */
236
334
  fullValidate(rows, cb) {
237
- if (process.env.NODE_ENV === 'development') {
238
- if (XEUtils.isFunction(cb)) {
239
- warnLog('vxe.error.notValidators', ['fullValidate(rows, callback)', 'fullValidate(rows)']);
240
- }
335
+ if (XEUtils.isFunction(cb)) {
336
+ warnLog('vxe.error.notValidators', ['fullValidate(rows, callback)', 'fullValidate(rows)']);
241
337
  }
242
338
  return beginValidate(rows, null, cb, true);
243
339
  },
@@ -313,28 +409,6 @@ hooks.add('tableValidatorModule', {
313
409
  return nextTick();
314
410
  }
315
411
  };
316
- const validErrorRuleValue = (rule, val) => {
317
- const { type, min, max, pattern } = rule;
318
- const isNumType = type === 'number';
319
- const numVal = isNumType ? XEUtils.toNumber(val) : XEUtils.getSize(val);
320
- // 判断数值
321
- if (isNumType && isNaN(val)) {
322
- return true;
323
- }
324
- // 如果存在 min,判断最小值
325
- if (!XEUtils.eqNull(min) && numVal < XEUtils.toNumber(min)) {
326
- return true;
327
- }
328
- // 如果存在 max,判断最大值
329
- if (!XEUtils.eqNull(max) && numVal > XEUtils.toNumber(max)) {
330
- return true;
331
- }
332
- // 如果存在 pattern,正则校验
333
- if (pattern && !(XEUtils.isRegExp(pattern) ? pattern : new RegExp(pattern)).test(val)) {
334
- return true;
335
- }
336
- return false;
337
- };
338
412
  validatorPrivateMethods = {
339
413
  /**
340
414
  * 校验数据
@@ -361,7 +435,7 @@ hooks.add('tableValidatorModule', {
361
435
  if (rules) {
362
436
  const cellValue = XEUtils.isUndefined(val) ? XEUtils.get(row, field) : val;
363
437
  rules.forEach((rule) => {
364
- const { type, trigger, required, validator } = rule;
438
+ const { trigger, validator } = rule;
365
439
  if (validType === 'all' || !trigger || validType === trigger) {
366
440
  if (validator) {
367
441
  const validParams = {
@@ -385,9 +459,7 @@ hooks.add('tableValidatorModule', {
385
459
  customValid = tcvMethod(validParams);
386
460
  }
387
461
  else {
388
- if (process.env.NODE_ENV === 'development') {
389
- warnLog('vxe.error.notValidators', [validator]);
390
- }
462
+ errLog('vxe.error.notValidators', [validator]);
391
463
  }
392
464
  }
393
465
  else {
@@ -412,19 +484,7 @@ hooks.add('tableValidatorModule', {
412
484
  }
413
485
  }
414
486
  else {
415
- const isArrType = type === 'array';
416
- const isArrVal = XEUtils.isArray(cellValue);
417
- let hasEmpty = true;
418
- if (isArrType || isArrVal) {
419
- hasEmpty = !isArrVal || !cellValue.length;
420
- }
421
- else if (XEUtils.isString(cellValue)) {
422
- hasEmpty = eqEmptyValue(cellValue.trim());
423
- }
424
- else {
425
- hasEmpty = eqEmptyValue(cellValue);
426
- }
427
- if (required ? (hasEmpty || validErrorRuleValue(rule, cellValue)) : (!hasEmpty && validErrorRuleValue(rule, cellValue))) {
487
+ if (!checkRuleStatus(rule, cellValue)) {
428
488
  validRuleErr = true;
429
489
  errorRules.push(new Rule(rule));
430
490
  }
@@ -3396,7 +3396,6 @@ export default defineComponent({
3396
3396
  // }
3397
3397
  // }
3398
3398
  // }
3399
- // if (process.env.NODE_ENV === 'development') {
3400
3399
  // if (props.showHeader && !props.showHeaderOverflow) {
3401
3400
  // warnLog('vxe.error.reqProp', ['show-header-overflow'])
3402
3401
  // }
@@ -3409,7 +3408,6 @@ export default defineComponent({
3409
3408
  if (props.footerSpanMethod) {
3410
3409
  warnLog('vxe.error.scrollErrProp', ['footer-span-method']);
3411
3410
  }
3412
- // }
3413
3411
  if (isReset) {
3414
3412
  const { visibleSize } = handleVirtualXVisible();
3415
3413
  scrollXStore.startIndex = 0;
@@ -4100,9 +4098,7 @@ export default defineComponent({
4100
4098
  reactData.tableData = tableData.slice(0);
4101
4099
  }
4102
4100
  else {
4103
- if (process.env.NODE_ENV === 'development') {
4104
- warnLog('vxe.error.reqProp', ['keep-source']);
4105
- }
4101
+ errLog('vxe.error.reqProp', ['keep-source']);
4106
4102
  }
4107
4103
  return nextTick();
4108
4104
  },
@@ -4283,9 +4279,7 @@ export default defineComponent({
4283
4279
  const { transform } = treeOpts;
4284
4280
  const { handleGetRowId } = createHandleGetRowId($xeTable);
4285
4281
  if (!keepSource) {
4286
- if (process.env.NODE_ENV === 'development') {
4287
- errLog('vxe.error.reqProp', ['keep-source']);
4288
- }
4282
+ errLog('vxe.error.reqProp', ['keep-source']);
4289
4283
  return nextTick();
4290
4284
  }
4291
4285
  let targetRows = rows;
@@ -5846,9 +5840,7 @@ export default defineComponent({
5846
5840
  return nextTick();
5847
5841
  },
5848
5842
  reloadExpandContent(row) {
5849
- if (process.env.NODE_ENV === 'development') {
5850
- warnLog('vxe.error.delFunc', ['reloadExpandContent', 'reloadRowExpand']);
5851
- }
5843
+ warnLog('vxe.error.delFunc', ['reloadExpandContent', 'reloadRowExpand']);
5852
5844
  // 即将废弃
5853
5845
  return $xeTable.reloadRowExpand(row);
5854
5846
  },
@@ -5954,9 +5946,7 @@ export default defineComponent({
5954
5946
  },
5955
5947
  isExpandByRow(row) {
5956
5948
  // 已废弃
5957
- if (process.env.NODE_ENV === 'development') {
5958
- warnLog('vxe.error.delFunc', ['isExpandByRow', 'isRowExpandByRow']);
5959
- }
5949
+ warnLog('vxe.error.delFunc', ['isExpandByRow', 'isRowExpandByRow']);
5960
5950
  return tableMethods.isRowExpandByRow(row);
5961
5951
  },
5962
5952
  /**
@@ -6136,9 +6126,7 @@ export default defineComponent({
6136
6126
  return nextTick();
6137
6127
  },
6138
6128
  reloadTreeChilds(row) {
6139
- if (process.env.NODE_ENV === 'development') {
6140
- warnLog('vxe.error.delFunc', ['reloadTreeChilds', 'reloadTreeExpand']);
6141
- }
6129
+ warnLog('vxe.error.delFunc', ['reloadTreeChilds', 'reloadTreeExpand']);
6142
6130
  // 即将废弃
6143
6131
  return $xeTable.reloadTreeExpand(row);
6144
6132
  },
@@ -8064,10 +8052,8 @@ export default defineComponent({
8064
8052
  // 兼容老版本
8065
8053
  if (!evntList.length && type === 'event.clearEdit') {
8066
8054
  evntList = interceptor.get('event.clearActived');
8067
- if (process.env.NODE_ENV === 'development') {
8068
- if (evntList.length) {
8069
- warnLog('vxe.error.delEvent', ['event.clearActived', 'event.clearEdit']);
8070
- }
8055
+ if (evntList.length) {
8056
+ warnLog('vxe.error.delEvent', ['event.clearActived', 'event.clearEdit']);
8071
8057
  }
8072
8058
  }
8073
8059
  // 兼容老版本
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.13.29";
3
+ export const version = "4.13.30";
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.13.29"}`;
3
+ const version = `table v${"4.13.30"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
@@ -1367,31 +1367,6 @@ var _default = exports.default = (0, _vue.defineComponent)({
1367
1367
  // return nextTick()
1368
1368
  // }
1369
1369
  };
1370
- // 检查插槽
1371
- if (process.env.NODE_ENV === 'development') {
1372
- gridMethods.loadColumn = columns => {
1373
- const $xeTable = refTable.value;
1374
- _xeUtils.default.eachTree(columns, column => {
1375
- if (column.slots) {
1376
- _xeUtils.default.each(column.slots, func => {
1377
- if (!_xeUtils.default.isFunction(func)) {
1378
- if (!slots[func]) {
1379
- (0, _log.errLog)('vxe.error.notSlot', [func]);
1380
- }
1381
- }
1382
- });
1383
- }
1384
- });
1385
- if ($xeTable) {
1386
- return $xeTable.loadColumn(columns);
1387
- }
1388
- return (0, _vue.nextTick)();
1389
- };
1390
- gridMethods.reloadColumn = columns => {
1391
- gridExtendTableMethods.clearAll();
1392
- return gridMethods.loadColumn(columns);
1393
- };
1394
- }
1395
1370
  const gridPrivateMethods = {
1396
1371
  extendTableMethods,
1397
1372
  callSlot(slotFunc, params) {
@@ -1466,7 +1441,31 @@ var _default = exports.default = (0, _vue.defineComponent)({
1466
1441
  }, evnt);
1467
1442
  }
1468
1443
  };
1469
- Object.assign($xeGrid, gridExtendTableMethods, gridMethods, gridPrivateMethods);
1444
+ Object.assign($xeGrid, gridExtendTableMethods, gridMethods, gridPrivateMethods, {
1445
+ // 检查插槽
1446
+ loadColumn(columns) {
1447
+ const $xeTable = refTable.value;
1448
+ _xeUtils.default.eachTree(columns, column => {
1449
+ if (column.slots) {
1450
+ _xeUtils.default.each(column.slots, func => {
1451
+ if (!_xeUtils.default.isFunction(func)) {
1452
+ if (!slots[func]) {
1453
+ (0, _log.errLog)('vxe.error.notSlot', [func]);
1454
+ }
1455
+ }
1456
+ });
1457
+ }
1458
+ });
1459
+ if ($xeTable) {
1460
+ return $xeTable.loadColumn(columns);
1461
+ }
1462
+ return (0, _vue.nextTick)();
1463
+ },
1464
+ reloadColumn(columns) {
1465
+ $xeGrid.clearAll();
1466
+ return $xeGrid.loadColumn(columns);
1467
+ }
1468
+ });
1470
1469
  const columnFlag = (0, _vue.ref)(0);
1471
1470
  (0, _vue.watch)(() => props.columns ? props.columns.length : -1, () => {
1472
1471
  columnFlag.value++;