vxe-table 3.15.28 → 3.15.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 (63) hide show
  1. package/es/grid/src/grid.js +39 -42
  2. package/es/index.css +1 -1
  3. package/es/index.min.css +1 -1
  4. package/es/style.css +1 -1
  5. package/es/style.min.css +1 -1
  6. package/es/table/module/edit/mixin.js +11 -27
  7. package/es/table/module/export/mixin.js +65 -139
  8. package/es/table/module/filter/mixin.js +1 -0
  9. package/es/table/module/menu/mixin.js +2 -6
  10. package/es/table/module/validator/mixin.js +99 -41
  11. package/es/table/src/methods.js +110 -89
  12. package/es/table/src/table.js +6 -8
  13. package/es/table/style.css +6 -0
  14. package/es/table/style.min.css +1 -1
  15. package/es/ui/index.js +1 -1
  16. package/es/ui/src/log.js +1 -1
  17. package/es/vxe-table/style.css +6 -0
  18. package/es/vxe-table/style.min.css +1 -1
  19. package/lib/grid/src/grid.js +24 -26
  20. package/lib/grid/src/grid.min.js +1 -1
  21. package/lib/index.css +1 -1
  22. package/lib/index.min.css +1 -1
  23. package/lib/index.umd.js +358 -615
  24. package/lib/index.umd.min.js +1 -1
  25. package/lib/style.css +1 -1
  26. package/lib/style.min.css +1 -1
  27. package/lib/table/module/edit/mixin.js +11 -27
  28. package/lib/table/module/edit/mixin.min.js +1 -1
  29. package/lib/table/module/export/mixin.js +78 -168
  30. package/lib/table/module/export/mixin.min.js +1 -1
  31. package/lib/table/module/filter/mixin.js +1 -0
  32. package/lib/table/module/menu/mixin.js +2 -6
  33. package/lib/table/module/menu/mixin.min.js +1 -1
  34. package/lib/table/module/validator/mixin.js +97 -40
  35. package/lib/table/module/validator/mixin.min.js +1 -1
  36. package/lib/table/src/methods.js +121 -95
  37. package/lib/table/src/methods.min.js +1 -1
  38. package/lib/table/src/table.js +8 -10
  39. package/lib/table/src/table.min.js +1 -1
  40. package/lib/table/style/style.css +6 -0
  41. package/lib/table/style/style.min.css +1 -1
  42. package/lib/ui/index.js +1 -1
  43. package/lib/ui/index.min.js +1 -1
  44. package/lib/ui/src/log.js +1 -1
  45. package/lib/ui/src/log.min.js +1 -1
  46. package/lib/vxe-table/style/style.css +6 -0
  47. package/lib/vxe-table/style/style.min.css +1 -1
  48. package/package.json +1 -1
  49. package/packages/grid/src/grid.ts +39 -41
  50. package/packages/table/module/edit/mixin.ts +11 -27
  51. package/packages/table/module/export/mixin.ts +96 -158
  52. package/packages/table/module/filter/mixin.ts +1 -0
  53. package/packages/table/module/menu/mixin.ts +2 -6
  54. package/packages/table/module/validator/mixin.ts +101 -40
  55. package/packages/table/src/methods.ts +115 -90
  56. package/packages/table/src/table.ts +6 -8
  57. package/styles/components/table.scss +14 -0
  58. /package/es/{iconfont.1747176212818.ttf → iconfont.1747357311626.ttf} +0 -0
  59. /package/es/{iconfont.1747176212818.woff → iconfont.1747357311626.woff} +0 -0
  60. /package/es/{iconfont.1747176212818.woff2 → iconfont.1747357311626.woff2} +0 -0
  61. /package/lib/{iconfont.1747176212818.ttf → iconfont.1747357311626.ttf} +0 -0
  62. /package/lib/{iconfont.1747176212818.woff → iconfont.1747357311626.woff} +0 -0
  63. /package/lib/{iconfont.1747176212818.woff2 → iconfont.1747357311626.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -158,43 +158,6 @@ module.exports = function (it) {
158
158
  };
159
159
 
160
160
 
161
- /***/ }),
162
-
163
- /***/ 6955:
164
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
165
-
166
-
167
- var TO_STRING_TAG_SUPPORT = __webpack_require__(2140);
168
- var isCallable = __webpack_require__(4901);
169
- var classofRaw = __webpack_require__(2195);
170
- var wellKnownSymbol = __webpack_require__(8227);
171
-
172
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
173
- var $Object = Object;
174
-
175
- // ES3 wrong here
176
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
177
-
178
- // fallback for IE11 Script Access Denied error
179
- var tryGet = function (it, key) {
180
- try {
181
- return it[key];
182
- } catch (error) { /* empty */ }
183
- };
184
-
185
- // getting tag from ES6+ `Object.prototype.toString`
186
- module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
187
- var O, tag, result;
188
- return it === undefined ? 'Undefined' : it === null ? 'Null'
189
- // @@toStringTag case
190
- : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
191
- // builtinTag case
192
- : CORRECT_ARGUMENTS ? classofRaw(O)
193
- // ES3 arguments fallback
194
- : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
195
- };
196
-
197
-
198
161
  /***/ }),
199
162
 
200
163
  /***/ 7740:
@@ -253,22 +216,6 @@ module.exports = function (bitmap, value) {
253
216
  };
254
217
 
255
218
 
256
- /***/ }),
257
-
258
- /***/ 2106:
259
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
260
-
261
-
262
- var makeBuiltIn = __webpack_require__(283);
263
- var defineProperty = __webpack_require__(4913);
264
-
265
- module.exports = function (target, name, descriptor) {
266
- if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
267
- if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
268
- return defineProperty.f(target, name, descriptor);
269
- };
270
-
271
-
272
219
  /***/ }),
273
220
 
274
221
  /***/ 6840:
@@ -1482,38 +1429,6 @@ module.exports = function (argument) {
1482
1429
  };
1483
1430
 
1484
1431
 
1485
- /***/ }),
1486
-
1487
- /***/ 2140:
1488
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1489
-
1490
-
1491
- var wellKnownSymbol = __webpack_require__(8227);
1492
-
1493
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
1494
- var test = {};
1495
-
1496
- test[TO_STRING_TAG] = 'z';
1497
-
1498
- module.exports = String(test) === '[object z]';
1499
-
1500
-
1501
- /***/ }),
1502
-
1503
- /***/ 655:
1504
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1505
-
1506
-
1507
- var classof = __webpack_require__(6955);
1508
-
1509
- var $String = String;
1510
-
1511
- module.exports = function (argument) {
1512
- if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1513
- return $String(argument);
1514
- };
1515
-
1516
-
1517
1432
  /***/ }),
1518
1433
 
1519
1434
  /***/ 6823:
@@ -1582,20 +1497,6 @@ module.exports = DESCRIPTORS && fails(function () {
1582
1497
  });
1583
1498
 
1584
1499
 
1585
- /***/ }),
1586
-
1587
- /***/ 2812:
1588
- /***/ (function(module) {
1589
-
1590
-
1591
- var $TypeError = TypeError;
1592
-
1593
- module.exports = function (passed, required) {
1594
- if (passed < required) throw new $TypeError('Not enough arguments');
1595
- return passed;
1596
- };
1597
-
1598
-
1599
1500
  /***/ }),
1600
1501
 
1601
1502
  /***/ 8622:
@@ -1685,125 +1586,6 @@ $({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
1685
1586
  });
1686
1587
 
1687
1588
 
1688
- /***/ }),
1689
-
1690
- /***/ 4603:
1691
- /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
1692
-
1693
-
1694
- var defineBuiltIn = __webpack_require__(6840);
1695
- var uncurryThis = __webpack_require__(9504);
1696
- var toString = __webpack_require__(655);
1697
- var validateArgumentsLength = __webpack_require__(2812);
1698
-
1699
- var $URLSearchParams = URLSearchParams;
1700
- var URLSearchParamsPrototype = $URLSearchParams.prototype;
1701
- var append = uncurryThis(URLSearchParamsPrototype.append);
1702
- var $delete = uncurryThis(URLSearchParamsPrototype['delete']);
1703
- var forEach = uncurryThis(URLSearchParamsPrototype.forEach);
1704
- var push = uncurryThis([].push);
1705
- var params = new $URLSearchParams('a=1&a=2&b=3');
1706
-
1707
- params['delete']('a', 1);
1708
- // `undefined` case is a Chromium 117 bug
1709
- // https://bugs.chromium.org/p/v8/issues/detail?id=14222
1710
- params['delete']('b', undefined);
1711
-
1712
- if (params + '' !== 'a=2') {
1713
- defineBuiltIn(URLSearchParamsPrototype, 'delete', function (name /* , value */) {
1714
- var length = arguments.length;
1715
- var $value = length < 2 ? undefined : arguments[1];
1716
- if (length && $value === undefined) return $delete(this, name);
1717
- var entries = [];
1718
- forEach(this, function (v, k) { // also validates `this`
1719
- push(entries, { key: k, value: v });
1720
- });
1721
- validateArgumentsLength(length, 1);
1722
- var key = toString(name);
1723
- var value = toString($value);
1724
- var index = 0;
1725
- var dindex = 0;
1726
- var found = false;
1727
- var entriesLength = entries.length;
1728
- var entry;
1729
- while (index < entriesLength) {
1730
- entry = entries[index++];
1731
- if (found || entry.key === key) {
1732
- found = true;
1733
- $delete(this, entry.key);
1734
- } else dindex++;
1735
- }
1736
- while (dindex < entriesLength) {
1737
- entry = entries[dindex++];
1738
- if (!(entry.key === key && entry.value === value)) append(this, entry.key, entry.value);
1739
- }
1740
- }, { enumerable: true, unsafe: true });
1741
- }
1742
-
1743
-
1744
- /***/ }),
1745
-
1746
- /***/ 7566:
1747
- /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
1748
-
1749
-
1750
- var defineBuiltIn = __webpack_require__(6840);
1751
- var uncurryThis = __webpack_require__(9504);
1752
- var toString = __webpack_require__(655);
1753
- var validateArgumentsLength = __webpack_require__(2812);
1754
-
1755
- var $URLSearchParams = URLSearchParams;
1756
- var URLSearchParamsPrototype = $URLSearchParams.prototype;
1757
- var getAll = uncurryThis(URLSearchParamsPrototype.getAll);
1758
- var $has = uncurryThis(URLSearchParamsPrototype.has);
1759
- var params = new $URLSearchParams('a=1');
1760
-
1761
- // `undefined` case is a Chromium 117 bug
1762
- // https://bugs.chromium.org/p/v8/issues/detail?id=14222
1763
- if (params.has('a', 2) || !params.has('a', undefined)) {
1764
- defineBuiltIn(URLSearchParamsPrototype, 'has', function has(name /* , value */) {
1765
- var length = arguments.length;
1766
- var $value = length < 2 ? undefined : arguments[1];
1767
- if (length && $value === undefined) return $has(this, name);
1768
- var values = getAll(this, name); // also validates `this`
1769
- validateArgumentsLength(length, 1);
1770
- var value = toString($value);
1771
- var index = 0;
1772
- while (index < values.length) {
1773
- if (values[index++] === value) return true;
1774
- } return false;
1775
- }, { enumerable: true, unsafe: true });
1776
- }
1777
-
1778
-
1779
- /***/ }),
1780
-
1781
- /***/ 8721:
1782
- /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
1783
-
1784
-
1785
- var DESCRIPTORS = __webpack_require__(3724);
1786
- var uncurryThis = __webpack_require__(9504);
1787
- var defineBuiltInAccessor = __webpack_require__(2106);
1788
-
1789
- var URLSearchParamsPrototype = URLSearchParams.prototype;
1790
- var forEach = uncurryThis(URLSearchParamsPrototype.forEach);
1791
-
1792
- // `URLSearchParams.prototype.size` getter
1793
- // https://github.com/whatwg/url/pull/734
1794
- if (DESCRIPTORS && !('size' in URLSearchParamsPrototype)) {
1795
- defineBuiltInAccessor(URLSearchParamsPrototype, 'size', {
1796
- get: function size() {
1797
- var count = 0;
1798
- forEach(this, function () { count++; });
1799
- return count;
1800
- },
1801
- configurable: true,
1802
- enumerable: true
1803
- });
1804
- }
1805
-
1806
-
1807
1589
  /***/ })
1808
1590
 
1809
1591
  /******/ });
@@ -2220,7 +2002,7 @@ function getClass(property, params) {
2220
2002
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2221
2003
 
2222
2004
 
2223
- const version = "3.15.27";
2005
+ const version = "3.15.30";
2224
2006
  core_.VxeUI.version = version;
2225
2007
  core_.VxeUI.tableVersion = version;
2226
2008
  core_.VxeUI.setConfig({
@@ -2864,7 +2646,7 @@ function isNodeElement(elem) {
2864
2646
  const {
2865
2647
  log: log_log
2866
2648
  } = core_.VxeUI;
2867
- const log_version = `table v${"3.15.27"}`;
2649
+ const log_version = `table v${"3.15.30"}`;
2868
2650
  const warnLog = log_log.create('warn', log_version);
2869
2651
  const errLog = log_log.create('error', log_version);
2870
2652
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -5327,8 +5109,11 @@ function eqCellValue(row1, row2, field) {
5327
5109
  }
5328
5110
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(val1, val2);
5329
5111
  }
5330
- function getNextSortOrder(_vm, column) {
5331
- const orders = _vm.sortOpts.orders;
5112
+ function getNextSortOrder($xeTable, column) {
5113
+ const sortOpts = $xeTable.computeSortOpts;
5114
+ const {
5115
+ orders = []
5116
+ } = sortOpts;
5332
5117
  const currOrder = column.order || null;
5333
5118
  const oIndex = orders.indexOf(currOrder) + 1;
5334
5119
  return orders[oIndex < orders.length ? oIndex : 0];
@@ -7685,8 +7470,66 @@ function removeFooterMerges($xeTable, merges) {
7685
7470
  }
7686
7471
  return rest;
7687
7472
  }
7688
- function clearAllSort(_vm) {
7689
- _vm.tableFullColumn.forEach(column => {
7473
+ function handleSortEvent($xeTable, evnt, sortConfs, isUpdate) {
7474
+ const sortOpts = $xeTable.computeSortOpts;
7475
+ const {
7476
+ multiple,
7477
+ remote,
7478
+ orders
7479
+ } = sortOpts;
7480
+ if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(sortConfs)) {
7481
+ sortConfs = [sortConfs];
7482
+ }
7483
+ if (sortConfs && sortConfs.length) {
7484
+ if (!multiple) {
7485
+ sortConfs = [sortConfs[0]];
7486
+ clearAllSort($xeTable);
7487
+ }
7488
+ let firstColumn = null;
7489
+ sortConfs.forEach((confs, index) => {
7490
+ let {
7491
+ field,
7492
+ order
7493
+ } = confs;
7494
+ let column = field;
7495
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(field)) {
7496
+ column = $xeTable.getColumnByField(field);
7497
+ }
7498
+ if (!firstColumn) {
7499
+ firstColumn = column;
7500
+ }
7501
+ if (column && column.sortable) {
7502
+ if (orders && orders.indexOf(order) === -1) {
7503
+ order = getNextSortOrder($xeTable, column);
7504
+ }
7505
+ if (column.order !== order) {
7506
+ column.order = order;
7507
+ }
7508
+ column.sortTime = Date.now() + index;
7509
+ }
7510
+ });
7511
+ if (isUpdate) {
7512
+ if (!remote) {
7513
+ $xeTable.handleTableData(true);
7514
+ }
7515
+ }
7516
+ if (evnt) {
7517
+ $xeTable.handleColumnSortEvent(evnt, firstColumn);
7518
+ }
7519
+ return $xeTable.$nextTick().then(() => {
7520
+ updateRowOffsetTop($xeTable);
7521
+ $xeTable.updateCellAreas();
7522
+ return updateStyle($xeTable);
7523
+ });
7524
+ }
7525
+ return $xeTable.$nextTick();
7526
+ }
7527
+ function clearAllSort($xeTable) {
7528
+ const internalData = $xeTable;
7529
+ const {
7530
+ tableFullColumn
7531
+ } = internalData;
7532
+ tableFullColumn.forEach(column => {
7690
7533
  column.order = null;
7691
7534
  });
7692
7535
  }
@@ -8815,7 +8658,6 @@ function parseColumns($xeTable, isReset) {
8815
8658
  // }
8816
8659
  // }
8817
8660
  // }
8818
- // if (process.env.VUE_APP_VXE_ENV === 'development') {
8819
8661
  // if (props.showHeader && !props.showHeaderOverflow) {
8820
8662
  // warnLog('vxe.error.reqProp', ['show-header-overflow'])
8821
8663
  // }
@@ -8828,7 +8670,6 @@ function parseColumns($xeTable, isReset) {
8828
8670
  if (props.footerSpanMethod) {
8829
8671
  warnLog('vxe.error.scrollErrProp', ['footer-span-method']);
8830
8672
  }
8831
- // }
8832
8673
  if (isReset) {
8833
8674
  const {
8834
8675
  visibleSize
@@ -9051,7 +8892,8 @@ function checkLastSyncScroll($xeTable, isRollX, isRollY) {
9051
8892
  const internalData = $xeTable;
9052
8893
  const {
9053
8894
  scrollXLoad,
9054
- scrollYLoad
8895
+ scrollYLoad,
8896
+ isAllOverflow
9055
8897
  } = reactData;
9056
8898
  const {
9057
8899
  lcsTimeout
@@ -9069,13 +8911,19 @@ function checkLastSyncScroll($xeTable, isRollX, isRollY) {
9069
8911
  internalData.inBodyScroll = false;
9070
8912
  internalData.inFooterScroll = false;
9071
8913
  internalData.scrollRenderType = '';
9072
- calcCellHeight($xeTable);
8914
+ if (!isAllOverflow) {
8915
+ calcCellHeight($xeTable);
8916
+ updateRowOffsetTop($xeTable);
8917
+ }
9073
8918
  if (isRollX && scrollXLoad) {
9074
8919
  $xeTable.updateScrollXData();
9075
8920
  }
9076
8921
  if (isRollY && scrollYLoad) {
9077
8922
  $xeTable.updateScrollYData().then(() => {
9078
- calcCellHeight($xeTable);
8923
+ if (!isAllOverflow) {
8924
+ calcCellHeight($xeTable);
8925
+ updateRowOffsetTop($xeTable);
8926
+ }
9079
8927
  $xeTable.updateScrollYSpace();
9080
8928
  });
9081
8929
  }
@@ -9555,9 +9403,7 @@ const Methods = {
9555
9403
  }
9556
9404
  this.tableData = tableData.slice(0);
9557
9405
  } else {
9558
- if (true) {
9559
- warnLog('vxe.error.reqProp', ['keep-source']);
9560
- }
9406
+ errLog('vxe.error.reqProp', ['keep-source']);
9561
9407
  }
9562
9408
  return this.$nextTick();
9563
9409
  },
@@ -9866,16 +9712,12 @@ const Methods = {
9866
9712
  getVMRowIndex: createGetRowCacheProp('$index'),
9867
9713
  // 在 v3 中废弃
9868
9714
  _getRowIndex(row) {
9869
- if (true) {
9870
- warnLog('vxe.error.delFunc', ['_getRowIndex', 'getVTRowIndex']);
9871
- }
9715
+ warnLog('vxe.error.delFunc', ['_getRowIndex', 'getVTRowIndex']);
9872
9716
  return this.getVTRowIndex(row);
9873
9717
  },
9874
9718
  // 在 v3 中废弃
9875
9719
  $getRowIndex(row) {
9876
- if (true) {
9877
- warnLog('vxe.error.delFunc', ['$getRowIndex', 'getVMRowIndex']);
9878
- }
9720
+ warnLog('vxe.error.delFunc', ['$getRowIndex', 'getVMRowIndex']);
9879
9721
  return this.getVMRowIndex(row);
9880
9722
  },
9881
9723
  /**
@@ -9895,16 +9737,12 @@ const Methods = {
9895
9737
  getVMColumnIndex: createGetColumnCacheProp('$index'),
9896
9738
  // 在 v3 中废弃
9897
9739
  _getColumnIndex(column) {
9898
- if (true) {
9899
- warnLog('vxe.error.delFunc', ['_getColumnIndex', 'getVTColumnIndex']);
9900
- }
9740
+ warnLog('vxe.error.delFunc', ['_getColumnIndex', 'getVTColumnIndex']);
9901
9741
  return this.getVTColumnIndex(column);
9902
9742
  },
9903
9743
  // 在 v3 中废弃
9904
9744
  $getColumnIndex(column) {
9905
- if (true) {
9906
- warnLog('vxe.error.delFunc', ['$getColumnIndex', 'getVMColumnIndex']);
9907
- }
9745
+ warnLog('vxe.error.delFunc', ['$getColumnIndex', 'getVMColumnIndex']);
9908
9746
  return this.getVMColumnIndex(column);
9909
9747
  },
9910
9748
  /**
@@ -10030,9 +9868,7 @@ const Methods = {
10030
9868
  handleGetRowId
10031
9869
  } = createHandleGetRowId($xeTable);
10032
9870
  if (!keepSource) {
10033
- if (true) {
10034
- errLog('vxe.error.reqProp', ['keep-source']);
10035
- }
9871
+ errLog('vxe.error.reqProp', ['keep-source']);
10036
9872
  return $xeTable.$nextTick();
10037
9873
  }
10038
9874
  let targetRows = rows;
@@ -10730,6 +10566,7 @@ const Methods = {
10730
10566
  }
10731
10567
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([targetColumn], column => {
10732
10568
  column.fixed = fixed;
10569
+ column.renderFixed = fixed;
10733
10570
  });
10734
10571
  $xeTable.saveCustomStore('update:fixed');
10735
10572
  if (!status) {
@@ -10755,6 +10592,7 @@ const Methods = {
10755
10592
  if (targetColumn && targetColumn.fixed) {
10756
10593
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([targetColumn], column => {
10757
10594
  column.fixed = null;
10595
+ column.renderFixed = null;
10758
10596
  });
10759
10597
  $xeTable.saveCustomStore('update:fixed');
10760
10598
  if (!status) {
@@ -11758,10 +11596,8 @@ const Methods = {
11758
11596
  // 兼容老版本
11759
11597
  if (!evntList.length && type === 'event.clearEdit') {
11760
11598
  evntList = methods_interceptor.get('event.clearActived');
11761
- if (true) {
11762
- if (evntList.length) {
11763
- warnLog('vxe.error.delEvent', ['event.clearActived', 'event.clearEdit']);
11764
- }
11599
+ if (evntList.length) {
11600
+ warnLog('vxe.error.delEvent', ['event.clearActived', 'event.clearEdit']);
11765
11601
  }
11766
11602
  }
11767
11603
  // 兼容老版本
@@ -12537,10 +12373,14 @@ const Methods = {
12537
12373
  if (tooltipStore.column !== column || tooltipStore.row !== row || !tooltipStore.visible) {
12538
12374
  const ctEl = tdEl.querySelector('.vxe-cell--wrapper');
12539
12375
  let ovEl = null;
12376
+ let tipEl = tdEl.querySelector(column.type === 'html' ? '.vxe-cell--html' : '.vxe-cell--label');
12540
12377
  if (column.treeNode) {
12541
12378
  ovEl = tdEl.querySelector('.vxe-tree-cell');
12542
12379
  }
12543
- handleTooltip($xeTable, evnt, tdEl, ovEl || ctEl, tdEl.querySelector('.vxe-cell--label') || tdEl.querySelector('.vxe-cell--wrapper'), params);
12380
+ if (!tipEl) {
12381
+ tipEl = ctEl;
12382
+ }
12383
+ handleTooltip($xeTable, evnt, tdEl, ovEl || ctEl, tipEl, params);
12544
12384
  }
12545
12385
  },
12546
12386
  /**
@@ -12558,7 +12398,16 @@ const Methods = {
12558
12398
  const tdEl = evnt.currentTarget;
12559
12399
  handleTargetEnterEvent($xeTable, tooltipStore.column !== column || !!tooltipStore.row);
12560
12400
  if (tooltipStore.column !== column || !tooltipStore.visible) {
12561
- handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--wrapper'), tdEl.querySelector('.vxe-cell--label') || tdEl.querySelector('.vxe-cell--wrapper'), params);
12401
+ const ctEl = tdEl.querySelector('.vxe-cell--wrapper');
12402
+ let ovEl = null;
12403
+ let tipEl = tdEl.querySelector(column.type === 'html' ? '.vxe-cell--html' : '.vxe-cell--label');
12404
+ if (column.type === 'html') {
12405
+ ovEl = tdEl.querySelector('.vxe-cell--html');
12406
+ }
12407
+ if (!tipEl) {
12408
+ tipEl = ctEl;
12409
+ }
12410
+ handleTooltip($xeTable, evnt, tdEl, ovEl || ctEl, tipEl, params);
12562
12411
  }
12563
12412
  },
12564
12413
  openTooltip(target, content) {
@@ -14972,56 +14821,12 @@ const Methods = {
14972
14821
  },
14973
14822
  setSort(sortConfs, isUpdate) {
14974
14823
  const $xeTable = this;
14975
- const sortOpts = $xeTable.computeSortOpts;
14976
- const {
14977
- multiple,
14978
- remote,
14979
- orders
14980
- } = sortOpts;
14981
- if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(sortConfs)) {
14982
- sortConfs = [sortConfs];
14983
- }
14984
- if (sortConfs && sortConfs.length) {
14985
- if (!multiple) {
14986
- sortConfs = [sortConfs[0]];
14987
- clearAllSort($xeTable);
14988
- }
14989
- let firstColumn = null;
14990
- sortConfs.forEach((confs, index) => {
14991
- let {
14992
- field,
14993
- order
14994
- } = confs;
14995
- let column = field;
14996
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(field)) {
14997
- column = $xeTable.getColumnByField(field);
14998
- }
14999
- if (!firstColumn) {
15000
- firstColumn = column;
15001
- }
15002
- if (column && column.sortable) {
15003
- if (orders && orders.indexOf(order) === -1) {
15004
- order = getNextSortOrder($xeTable, column);
15005
- }
15006
- if (column.order !== order) {
15007
- column.order = order;
15008
- }
15009
- column.sortTime = Date.now() + index;
15010
- }
15011
- });
15012
- if (isUpdate) {
15013
- if (!remote) {
15014
- $xeTable.handleTableData(true);
15015
- }
15016
- $xeTable.handleColumnSortEvent(new Event('click'), firstColumn);
15017
- }
15018
- return $xeTable.$nextTick().then(() => {
15019
- updateRowOffsetTop($xeTable);
15020
- $xeTable.updateCellAreas();
15021
- return updateStyle($xeTable);
15022
- });
15023
- }
15024
- return $xeTable.$nextTick();
14824
+ // 已废弃,即将去掉事件触发 new Event('click') -> null
14825
+ return handleSortEvent($xeTable, new Event('click'), sortConfs, isUpdate);
14826
+ },
14827
+ setSortByEvent(evnt, sortConfs, isUpdate) {
14828
+ const $xeTable = this;
14829
+ return handleSortEvent($xeTable, evnt, sortConfs, isUpdate);
15025
14830
  },
15026
14831
  /**
15027
14832
  * 清空指定列的排序条件
@@ -15092,9 +14897,7 @@ const Methods = {
15092
14897
  },
15093
14898
  // 在 v3 中废弃
15094
14899
  getSortColumn() {
15095
- if (true) {
15096
- warnLog('vxe.error.delFunc', ['getSortColumn', 'getSortColumns']);
15097
- }
14900
+ warnLog('vxe.error.delFunc', ['getSortColumn', 'getSortColumns']);
15098
14901
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().find(this.tableFullColumn, column => (column.sortable || column.remoteSort) && column.order);
15099
14902
  },
15100
14903
  isSort(fieldOrColumn) {
@@ -15130,6 +14933,17 @@ const Methods = {
15130
14933
  }
15131
14934
  return sortList;
15132
14935
  },
14936
+ setFilterByEvent(evnt, fieldOrColumn, options, isUpdate) {
14937
+ const $xeTable = this;
14938
+ const column = handleFieldOrColumn($xeTable, fieldOrColumn);
14939
+ if (column && column.filters) {
14940
+ column.filters = toFilters(options || []);
14941
+ if (isUpdate) {
14942
+ return $xeTable.handleColumnConfirmFilter(column, evnt);
14943
+ }
14944
+ }
14945
+ return $xeTable.$nextTick();
14946
+ },
15133
14947
  /**
15134
14948
  * 关闭筛选
15135
14949
  * @param {Event} evnt 事件
@@ -15283,9 +15097,7 @@ const Methods = {
15283
15097
  return $xeTable.$nextTick();
15284
15098
  },
15285
15099
  reloadExpandContent(row) {
15286
- if (true) {
15287
- warnLog('vxe.error.delFunc', ['reloadExpandContent', 'reloadRowExpand']);
15288
- }
15100
+ warnLog('vxe.error.delFunc', ['reloadExpandContent', 'reloadRowExpand']);
15289
15101
  // 即将废弃
15290
15102
  return this.reloadRowExpand(row);
15291
15103
  },
@@ -15464,9 +15276,7 @@ const Methods = {
15464
15276
  return !!rowExpandedFlag && !!rowExpandedMaps[rowid];
15465
15277
  },
15466
15278
  isExpandByRow(row) {
15467
- if (true) {
15468
- warnLog('vxe.error.delFunc', ['isExpandByRow', 'isRowExpandByRow']);
15469
- }
15279
+ warnLog('vxe.error.delFunc', ['isExpandByRow', 'isRowExpandByRow']);
15470
15280
  // 即将废弃
15471
15281
  return this.isRowExpandByRow(row);
15472
15282
  },
@@ -15725,9 +15535,7 @@ const Methods = {
15725
15535
  },
15726
15536
  reloadTreeChilds(row) {
15727
15537
  const $xeTable = this;
15728
- if (true) {
15729
- warnLog('vxe.error.delFunc', ['reloadTreeChilds', 'reloadTreeExpand']);
15730
- }
15538
+ warnLog('vxe.error.delFunc', ['reloadTreeChilds', 'reloadTreeExpand']);
15731
15539
  // 即将废弃
15732
15540
  return $xeTable.reloadTreeExpand(row);
15733
15541
  },
@@ -21732,6 +21540,7 @@ const {
21732
21540
  if (column && column.filters) {
21733
21541
  column.filters = toFilters(options || []);
21734
21542
  if (isUpdate) {
21543
+ // 已废弃,即将去掉事件触发 new Event('click') -> null
21735
21544
  return $xeTable.handleColumnConfirmFilter(column, new Event('click'));
21736
21545
  }
21737
21546
  }
@@ -22259,9 +22068,7 @@ const {
22259
22068
  this.handleOpenMenuEvent(evnt, layout, params);
22260
22069
  // 在 v4 中废弃事件 cell-context-menu、header-cell-context-menu、footer-cell-context-menu
22261
22070
  if (this.$listeners[`${typePrefix}cell-context-menu`]) {
22262
- if (true) {
22263
- warnLog('vxe.error.delEvent', [`${typePrefix}cell-context-menu`, `${typePrefix}cell-menu`]);
22264
- }
22071
+ warnLog('vxe.error.delEvent', [`${typePrefix}cell-context-menu`, `${typePrefix}cell-menu`]);
22265
22072
  this.emitEvent(`${typePrefix}cell-context-menu`, params, evnt);
22266
22073
  } else {
22267
22074
  this.emitEvent(`${typePrefix}cell-menu`, params, evnt);
@@ -22444,9 +22251,7 @@ const {
22444
22251
  }
22445
22252
  // 在 v4 中废弃事件 context-menu-click
22446
22253
  if (this.$listeners['context-menu-click']) {
22447
- if (true) {
22448
- warnLog('vxe.error.delEvent', ['context-menu-click', 'menu-click']);
22449
- }
22254
+ warnLog('vxe.error.delEvent', ['context-menu-click', 'menu-click']);
22450
22255
  this.emitEvent('context-menu-click', params, evnt);
22451
22256
  } else {
22452
22257
  this.emitEvent('menu-click', params, evnt);
@@ -22579,10 +22384,8 @@ function insertTreeRow($xeTable, newRecords, isAppend) {
22579
22384
  fullDataRowIdData[rowid] = rest;
22580
22385
  fullAllDataRowIdData[rowid] = rest;
22581
22386
  } else {
22582
- if (true) {
22583
- if (parentRowId) {
22584
- warnLog('vxe.error.unableInsert');
22585
- }
22387
+ if (parentRowId) {
22388
+ warnLog('vxe.error.unableInsert');
22586
22389
  }
22587
22390
  afterFullData[funcName](item);
22588
22391
  tableFullTreeData[funcName](item);
@@ -22730,11 +22533,9 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
22730
22533
  const parentLevel = parentRest ? parentRest.level : 0;
22731
22534
  newRecords.forEach((item, i) => {
22732
22535
  const rowid = getRowid($xeTable, item);
22733
- if (true) {
22734
- if (item[treeOpts.parentField]) {
22735
- if (parentRow && item[treeOpts.parentField] !== parentRow[rowField]) {
22736
- errLog('vxe.error.errProp', [`${treeOpts.parentField}=${item[treeOpts.parentField]}`, `${treeOpts.parentField}=${parentRow[rowField]}`]);
22737
- }
22536
+ if (item[treeOpts.parentField]) {
22537
+ if (parentRow && item[treeOpts.parentField] !== parentRow[rowField]) {
22538
+ errLog('vxe.error.errProp', [`${treeOpts.parentField}=${item[treeOpts.parentField]}`, `${treeOpts.parentField}=${parentRow[rowField]}`]);
22738
22539
  }
22739
22540
  }
22740
22541
  if (parentRow) {
@@ -22779,9 +22580,7 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
22779
22580
  }
22780
22581
  }
22781
22582
  } else {
22782
- if (true) {
22783
- warnLog('vxe.error.unableInsert');
22784
- }
22583
+ warnLog('vxe.error.unableInsert');
22785
22584
  insertTreeRow($xeTable, newRecords, true);
22786
22585
  }
22787
22586
  } else {
@@ -23401,9 +23200,7 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
23401
23200
  syncActivedCell($xeTable);
23402
23201
  },
23403
23202
  _clearActived(row) {
23404
- if (true) {
23405
- warnLog('vxe.error.delFunc', ['clearActived', 'clearEdit']);
23406
- }
23203
+ warnLog('vxe.error.delFunc', ['clearActived', 'clearEdit']);
23407
23204
  // 即将废弃
23408
23205
  return this.clearEdit(row);
23409
23206
  },
@@ -23423,9 +23220,7 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
23423
23220
  },
23424
23221
  _getActiveRecord() {
23425
23222
  const $xeTable = this;
23426
- if (true) {
23427
- warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord']);
23428
- }
23223
+ warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord']);
23429
23224
  // 即将废弃
23430
23225
  return $xeTable.getEditRecord();
23431
23226
  },
@@ -23451,9 +23246,7 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
23451
23246
  },
23452
23247
  _isActiveByRow(row) {
23453
23248
  const $xeTable = this;
23454
- if (true) {
23455
- warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow']);
23456
- }
23249
+ warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow']);
23457
23250
  // 即将废弃
23458
23251
  return $xeTable.isEditByRow(row);
23459
23252
  },
@@ -23535,9 +23328,7 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
23535
23328
  },
23536
23329
  _setActiveRow(row) {
23537
23330
  const $xeTable = this;
23538
- if (true) {
23539
- warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow']);
23540
- }
23331
+ warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow']);
23541
23332
  // 即将废弃
23542
23333
  return $xeTable.setEditRow(row);
23543
23334
  },
@@ -23557,9 +23348,7 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
23557
23348
  return handleEditCell($xeTable, row, column, isPos);
23558
23349
  },
23559
23350
  _setActiveCell(row, fieldOrColumn) {
23560
- if (true) {
23561
- warnLog('vxe.error.delFunc', ['setActiveCell', 'setEditCell']);
23562
- }
23351
+ warnLog('vxe.error.delFunc', ['setActiveCell', 'setEditCell']);
23563
23352
  // 即将废弃
23564
23353
  return this.setEditCell(row, fieldOrColumn);
23565
23354
  },
@@ -23710,12 +23499,6 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
23710
23499
  }
23711
23500
  }
23712
23501
  });
23713
- // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.delete.js
23714
- var web_url_search_params_delete = __webpack_require__(4603);
23715
- // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.has.js
23716
- var web_url_search_params_has = __webpack_require__(7566);
23717
- // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.size.js
23718
- var web_url_search_params_size = __webpack_require__(8721);
23719
23502
  ;// CONCATENATED MODULE: ./packages/table/module/export/util.ts
23720
23503
  // 默认导出或打印的 HTML 样式
23721
23504
  const defaultHtmlStyle = 'body{margin:0;padding: 0 1px;color:#333333;font-size:14px;font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu}body *{-webkit-box-sizing:border-box;box-sizing:border-box}.vxe-table{border-collapse:collapse;text-align:left;border-spacing:0}.vxe-table:not(.is--print){table-layout:fixed}.vxe-table,.vxe-table th,.vxe-table td,.vxe-table td{border-color:#D0D0D0;border-style:solid;border-width:0}.vxe-table.is--print{width:100%}.border--default,.border--full,.border--outer{border-top-width:1px}.border--default,.border--full,.border--outer{border-left-width:1px}.border--outer,.border--default th,.border--default td,.border--full th,.border--full td,.border--outer th,.border--inner th,.border--inner td{border-bottom-width:1px}.border--default,.border--outer,.border--full th,.border--full td{border-right-width:1px}.border--default th,.border--full th,.border--outer th{background-color:#f8f8f9}.vxe-table td>div,.vxe-table th>div{padding:.5em .4em}.col--center{text-align:center}.col--right{text-align:right}.vxe-table:not(.is--print) .col--ellipsis>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.vxe-table--tree-node{text-align:left}.vxe-table--tree-node-wrapper{position:relative}.vxe-table--tree-icon-wrapper{position:absolute;top:50%;width:1em;height:1em;text-align:center;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.vxe-table--tree-unfold-icon,.vxe-table--tree-fold-icon{position:absolute;width:0;height:0;border-style:solid;border-width:.5em;border-right-color:transparent;border-bottom-color:transparent}.vxe-table--tree-unfold-icon{left:.3em;top:0;border-left-color:#939599;border-top-color:transparent}.vxe-table--tree-fold-icon{left:0;top:.3em;border-left-color:transparent;border-top-color:#939599}.vxe-table--tree-cell{display:block;padding-left:1.5em}.vxe-table input[type="checkbox"]{margin:0}.vxe-table input[type="checkbox"],.vxe-table input[type="radio"],.vxe-table input[type="checkbox"]+span,.vxe-table input[type="radio"]+span{vertical-align:middle;padding-left:0.4em}';
@@ -23739,17 +23522,11 @@ function createHtmlPage(opts, content) {
23739
23522
 
23740
23523
 
23741
23524
 
23742
-
23743
-
23744
-
23745
23525
  const {
23746
23526
  getI18n: export_mixin_getI18n,
23747
23527
  renderer: export_mixin_renderer
23748
23528
  } = core_.VxeUI;
23749
23529
  let htmlCellElem;
23750
- // 导入
23751
- let fileForm;
23752
- let fileInput;
23753
23530
  const csvBOM = '\ufeff';
23754
23531
  const enterSymbol = '\r\n';
23755
23532
  function hasTreeChildren($xeTable, row) {
@@ -23774,7 +23551,7 @@ function getSeq($xeTable, cellValue, row, $rowIndex, column, $columnIndex) {
23774
23551
  return cellValue;
23775
23552
  }
23776
23553
  function defaultFilterExportColumn(column) {
23777
- return column.field || ['seq', 'checkbox', 'radio'].indexOf(column.type) > -1;
23554
+ return !!column.field || ['seq', 'checkbox', 'radio'].indexOf(column.type || '') > -1;
23778
23555
  }
23779
23556
  function toTableBorder(border) {
23780
23557
  if (border === true) {
@@ -24329,41 +24106,6 @@ function getContent($xeTable, opts, columns, datas) {
24329
24106
  }
24330
24107
  return '';
24331
24108
  }
24332
- /**
24333
- * 保存文件到本地
24334
- * @param {*} options 参数
24335
- */
24336
- function saveLocalFile(options) {
24337
- const {
24338
- filename,
24339
- type,
24340
- content
24341
- } = options;
24342
- const name = `${filename}.${type}`;
24343
- if (window.Blob) {
24344
- const blob = content instanceof Blob ? content : getExportBlobByContent(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(content), options);
24345
- if (navigator.msSaveBlob) {
24346
- navigator.msSaveBlob(blob, name);
24347
- } else {
24348
- const url = URL.createObjectURL(blob);
24349
- const linkElem = document.createElement('a');
24350
- linkElem.target = '_blank';
24351
- linkElem.download = name;
24352
- linkElem.href = url;
24353
- document.body.appendChild(linkElem);
24354
- linkElem.click();
24355
- document.body.removeChild(linkElem);
24356
- requestAnimationFrame(() => {
24357
- if (linkElem.parentNode) {
24358
- linkElem.parentNode.removeChild(linkElem);
24359
- }
24360
- URL.revokeObjectURL(url);
24361
- });
24362
- }
24363
- return Promise.resolve();
24364
- }
24365
- return Promise.reject(new Error(export_mixin_getI18n('vxe.error.notExp')));
24366
- }
24367
24109
  function downloadFile($xeTable, opts, content) {
24368
24110
  const {
24369
24111
  filename,
@@ -24378,22 +24120,22 @@ function downloadFile($xeTable, opts, content) {
24378
24120
  blob
24379
24121
  });
24380
24122
  }
24381
- saveLocalFile({
24382
- filename,
24383
- type,
24384
- content
24385
- }).then(() => {
24386
- if (opts.message !== false) {
24387
- // 检测弹窗模块
24388
- if (!core_.VxeUI.modal) {
24389
- errLog('vxe.error.reqModule', ['Modal']);
24123
+ if (core_.VxeUI.saveFile) {
24124
+ core_.VxeUI.saveFile({
24125
+ filename,
24126
+ type,
24127
+ content
24128
+ }).then(() => {
24129
+ if (opts.message !== false) {
24130
+ if (core_.VxeUI.modal) {
24131
+ core_.VxeUI.modal.message({
24132
+ content: export_mixin_getI18n('vxe.table.expSuccess'),
24133
+ status: 'success'
24134
+ });
24135
+ }
24390
24136
  }
24391
- core_.VxeUI.modal.message({
24392
- content: export_mixin_getI18n('vxe.table.expSuccess'),
24393
- status: 'success'
24394
- });
24395
- }
24396
- });
24137
+ });
24138
+ }
24397
24139
  }
24398
24140
  function clearColumnConvert(columns) {
24399
24141
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(columns, column => {
@@ -24822,72 +24564,6 @@ function handleCloseExport() {
24822
24564
  }
24823
24565
  return Promise.resolve();
24824
24566
  }
24825
- /**
24826
- * 读取本地文件
24827
- * @param {*} options 参数
24828
- */
24829
- function readLocalFile(options = {}) {
24830
- if (!fileForm) {
24831
- fileForm = document.createElement('form');
24832
- fileInput = document.createElement('input');
24833
- fileForm.className = 'vxe-table--file-form';
24834
- fileInput.name = 'file';
24835
- fileInput.type = 'file';
24836
- fileForm.appendChild(fileInput);
24837
- document.body.appendChild(fileForm);
24838
- }
24839
- return new Promise((resolve, reject) => {
24840
- const types = options.types || [];
24841
- const isAllType = !types.length || types.some(type => type === '*');
24842
- fileInput.multiple = !!options.multiple;
24843
- fileInput.accept = isAllType ? '' : `.${types.join(', .')}`;
24844
- fileInput.onchange = evnt => {
24845
- const {
24846
- files
24847
- } = evnt.target;
24848
- const file = files[0];
24849
- let errType;
24850
- // 校验类型
24851
- if (!isAllType) {
24852
- for (let fIndex = 0; fIndex < files.length; fIndex++) {
24853
- const {
24854
- type
24855
- } = parseFile(files[fIndex]);
24856
- if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(types, type)) {
24857
- errType = type;
24858
- break;
24859
- }
24860
- }
24861
- }
24862
- if (!errType) {
24863
- resolve({
24864
- status: true,
24865
- files,
24866
- file
24867
- });
24868
- } else {
24869
- if (options.message !== false) {
24870
- // 检测弹窗模块
24871
- if (!core_.VxeUI.modal) {
24872
- errLog('vxe.error.reqModule', ['Modal']);
24873
- }
24874
- core_.VxeUI.modal.message({
24875
- content: export_mixin_getI18n('vxe.error.notType', [errType]),
24876
- status: 'error'
24877
- });
24878
- }
24879
- const params = {
24880
- status: false,
24881
- files,
24882
- file
24883
- };
24884
- reject(params);
24885
- }
24886
- };
24887
- fileForm.reset();
24888
- fileInput.click();
24889
- });
24890
- }
24891
24567
  function handleFilterColumns(exportOpts, column, columns) {
24892
24568
  return columns.some(item => {
24893
24569
  if (isColumnInfo(item)) {
@@ -24923,7 +24599,7 @@ function handleFilterFields(exportOpts, column, includeFields, excludeFields) {
24923
24599
  }
24924
24600
  return false;
24925
24601
  }
24926
- return exportOpts.original ? column.field : defaultFilterExportColumn(column);
24602
+ return exportOpts.original ? !!column.field : defaultFilterExportColumn(column);
24927
24603
  }
24928
24604
  function handleExportAndPrint($xeTable, options, isPrint) {
24929
24605
  const props = $xeTable;
@@ -24995,7 +24671,7 @@ function handleExportAndPrint($xeTable, options, isPrint) {
24995
24671
  });
24996
24672
  // 默认选中
24997
24673
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(exportColumns, (column, index, items, path, parent) => {
24998
- const isColGroup = column.children && column.children.length;
24674
+ const isColGroup = column.children && column.children.length > 0;
24999
24675
  let isChecked = false;
25000
24676
  if (columns && columns.length) {
25001
24677
  isChecked = handleFilterColumns(defOpts, column, columns);
@@ -25135,14 +24811,14 @@ const convertToRows = originColumns => {
25135
24811
  showFooter
25136
24812
  } = props;
25137
24813
  const {
25138
- mergeFooterList,
25139
24814
  isGroup
25140
24815
  } = reactData;
25141
24816
  const {
25142
24817
  tableFullColumn,
25143
24818
  afterFullData,
24819
+ collectColumn,
25144
24820
  mergeBodyList,
25145
- collectColumn
24821
+ mergeFooterList
25146
24822
  } = internalData;
25147
24823
  const exportOpts = $xeTable.computeExportOpts;
25148
24824
  const treeOpts = $xeTable.computeTreeOpts;
@@ -25191,7 +24867,7 @@ const convertToRows = originColumns => {
25191
24867
  mode = selectRecords.length ? 'selected' : 'current';
25192
24868
  }
25193
24869
  const customCols = columns && columns.length ? columns : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(collectColumn, column => {
25194
- const isColGroup = column.children && column.children.length;
24870
+ const isColGroup = column.children && column.children.length > 0;
25195
24871
  let isChecked = false;
25196
24872
  if (columns && columns.length) {
25197
24873
  isChecked = handleFilterColumns(opts, column, columns);
@@ -25212,7 +24888,7 @@ const convertToRows = originColumns => {
25212
24888
  });
25213
24889
  // 如果设置源数据,则默认导出设置了字段的列
25214
24890
  if (!customCols && !columnFilterMethod) {
25215
- handleOptions.columnFilterMethod = ({
24891
+ columnFilterMethod = ({
25216
24892
  column
25217
24893
  }) => {
25218
24894
  if (excludeFields) {
@@ -25226,8 +24902,9 @@ const convertToRows = originColumns => {
25226
24902
  }
25227
24903
  return false;
25228
24904
  }
25229
- return original ? column.field : defaultFilterExportColumn(column);
24905
+ return original ? !!column.field : defaultFilterExportColumn(column);
25230
24906
  };
24907
+ handleOptions.columnFilterMethod = columnFilterMethod;
25231
24908
  }
25232
24909
  if (customCols) {
25233
24910
  handleOptions._isCustomColumn = true;
@@ -25258,6 +24935,7 @@ const convertToRows = originColumns => {
25258
24935
  children: 'childNodes',
25259
24936
  mapChildren: '_children'
25260
24937
  }), (column, index) => isColumnInfo(column) && (!columnFilterMethod || columnFilterMethod({
24938
+ $table: $xeTable,
25261
24939
  column: column,
25262
24940
  $columnIndex: index
25263
24941
  })), {
@@ -25267,6 +24945,7 @@ const convertToRows = originColumns => {
25267
24945
  });
25268
24946
  } else {
25269
24947
  groups = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(isGroup ? collectColumn : tableFullColumn, (column, index) => column.visible && (!columnFilterMethod || columnFilterMethod({
24948
+ $table: $xeTable,
25270
24949
  column,
25271
24950
  $columnIndex: index
25272
24951
  })), {
@@ -25319,10 +24998,8 @@ const convertToRows = originColumns => {
25319
24998
  // 检查类型,如果为自定义导出,则不需要校验类型
25320
24999
  if (!handleOptions.exportMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(exportOpts._typeMaps), type)) {
25321
25000
  errLog('vxe.error.notType', [type]);
25322
- if (true) {
25323
- if (['xlsx', 'pdf'].includes(type)) {
25324
- warnLog('vxe.error.reqPlugin', [4, 'plugin-export-xlsx']);
25325
- }
25001
+ if (['xlsx', 'pdf'].includes(type)) {
25002
+ warnLog('vxe.error.reqPlugin', [4, 'plugin-export-xlsx']);
25326
25003
  }
25327
25004
  const params = {
25328
25005
  status: false
@@ -25349,10 +25026,8 @@ const convertToRows = originColumns => {
25349
25026
  handleOptions.data = selectRecords;
25350
25027
  }
25351
25028
  } else if (mode === 'all') {
25352
- if (true) {
25353
- if (!$xeGrid) {
25354
- warnLog('vxe.error.errProp', ['all', 'mode=current,selected']);
25355
- }
25029
+ if (!$xeGrid) {
25030
+ errLog('vxe.error.errProp', ['all', 'mode=current,selected']);
25356
25031
  }
25357
25032
  if ($xeGrid && !handleOptions.remote) {
25358
25033
  const gridReactData = $xeGrid;
@@ -25369,10 +25044,8 @@ const convertToRows = originColumns => {
25369
25044
  const ajaxMethods = ajax.queryAll;
25370
25045
  const queryAllSuccessMethods = ajax.queryAllSuccess;
25371
25046
  const queryAllErrorMethods = ajax.queryAllError;
25372
- if (true) {
25373
- if (!ajaxMethods) {
25374
- warnLog('vxe.error.notFunc', ['proxy-config.ajax.queryAll']);
25375
- }
25047
+ if (!ajaxMethods) {
25048
+ errLog('vxe.error.notFunc', ['proxy-config.ajax.queryAll']);
25376
25049
  }
25377
25050
  if (ajaxMethods) {
25378
25051
  const params = {
@@ -25417,6 +25090,7 @@ const convertToRows = originColumns => {
25417
25090
  return handleExport($xeTable, handleOptions);
25418
25091
  },
25419
25092
  _importByFile(file, options) {
25093
+ const $xeTable = this;
25420
25094
  const opts = Object.assign({}, options);
25421
25095
  const {
25422
25096
  beforeImportMethod
@@ -25424,12 +25098,13 @@ const convertToRows = originColumns => {
25424
25098
  if (beforeImportMethod) {
25425
25099
  beforeImportMethod({
25426
25100
  options: opts,
25427
- $table: this
25101
+ $table: $xeTable
25428
25102
  });
25429
25103
  }
25430
- return handleFileImport(this, file, opts);
25104
+ return handleFileImport($xeTable, file, opts);
25431
25105
  },
25432
25106
  _importData(options) {
25107
+ const $xeTable = this;
25433
25108
  const {
25434
25109
  importOpts
25435
25110
  } = this;
@@ -25448,12 +25123,12 @@ const convertToRows = originColumns => {
25448
25123
  $table: this
25449
25124
  });
25450
25125
  }
25451
- return readLocalFile(opts).catch(e => {
25126
+ return core_.VxeUI.readFile(opts).catch(e => {
25452
25127
  if (afterImportMethod) {
25453
25128
  afterImportMethod({
25454
25129
  status: false,
25455
25130
  options: opts,
25456
- $table: this
25131
+ $table: $xeTable
25457
25132
  });
25458
25133
  }
25459
25134
  return Promise.reject(e);
@@ -25461,14 +25136,14 @@ const convertToRows = originColumns => {
25461
25136
  const {
25462
25137
  file
25463
25138
  } = params;
25464
- return handleFileImport(this, file, opts);
25139
+ return handleFileImport($xeTable, file, opts);
25465
25140
  });
25466
25141
  },
25467
25142
  _saveFile(options) {
25468
- return saveLocalFile(options);
25143
+ return core_.VxeUI.saveFile(options);
25469
25144
  },
25470
25145
  _readFile(options) {
25471
- return readLocalFile(options);
25146
+ return core_.VxeUI.readFile(options);
25472
25147
  },
25473
25148
  _print(options) {
25474
25149
  const $xeTable = this;
@@ -25576,18 +25251,28 @@ const convertToRows = originColumns => {
25576
25251
  return Promise.resolve();
25577
25252
  },
25578
25253
  _openImport(options) {
25254
+ const $xeTable = this;
25255
+ const props = $xeTable;
25256
+ const reactData = $xeTable;
25579
25257
  const {
25580
- importOpts
25581
- } = this;
25258
+ treeConfig,
25259
+ importConfig
25260
+ } = props;
25261
+ const {
25262
+ initStore,
25263
+ importStore,
25264
+ importParams
25265
+ } = reactData;
25266
+ const importOpts = $xeTable.computeImportOpts;
25582
25267
  const defOpts = Object.assign({
25583
25268
  mode: 'insertTop',
25584
25269
  message: true,
25585
25270
  types: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(importOpts._typeMaps),
25586
25271
  modes: ['insertTop', 'covering']
25587
- }, options, importOpts);
25272
+ }, importOpts, options);
25588
25273
  const types = defOpts.types || [];
25589
25274
  const modes = defOpts.modes || [];
25590
- const isTree = !!this.getTreeStatus();
25275
+ const isTree = !!treeConfig;
25591
25276
  if (isTree) {
25592
25277
  if (defOpts.message) {
25593
25278
  core_.VxeUI.modal.message({
@@ -25597,7 +25282,7 @@ const convertToRows = originColumns => {
25597
25282
  }
25598
25283
  return;
25599
25284
  }
25600
- if (!this.importConfig) {
25285
+ if (!importConfig) {
25601
25286
  errLog('vxe.error.reqProp', ['import-config']);
25602
25287
  }
25603
25288
  // 处理类型
@@ -25619,7 +25304,7 @@ const convertToRows = originColumns => {
25619
25304
  label: export_mixin_getI18n(`vxe.import.modes.${item}`)
25620
25305
  };
25621
25306
  });
25622
- Object.assign(this.importStore, {
25307
+ Object.assign(importStore, {
25623
25308
  file: null,
25624
25309
  type: '',
25625
25310
  filename: '',
@@ -25627,31 +25312,38 @@ const convertToRows = originColumns => {
25627
25312
  typeList,
25628
25313
  visible: true
25629
25314
  });
25630
- Object.assign(this.importParams, defOpts);
25631
- if (!modeList.some(item => item.value === this.importParams.mode)) {
25632
- this.importParams.mode = modeList[0].value;
25315
+ Object.assign(importParams, defOpts);
25316
+ if (!modeList.some(item => item.value === importParams.mode)) {
25317
+ importParams.mode = modeList[0].value;
25633
25318
  }
25634
- this.initStore.import = true;
25319
+ initStore.import = true;
25635
25320
  },
25636
25321
  _closeExport: handleCloseExport,
25637
25322
  _openExport(options) {
25638
- const {
25639
- exportOpts
25640
- } = this;
25641
- if (!this.exportConfig) {
25323
+ const $xeTable = this;
25324
+ const props = $xeTable;
25325
+ const exportOpts = $xeTable.computeExportOpts;
25326
+ const defOpts = Object.assign({
25327
+ message: true,
25328
+ types: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(exportOpts._typeMaps)
25329
+ }, exportOpts, options);
25330
+ if (!props.exportConfig) {
25642
25331
  errLog('vxe.error.reqProp', ['export-config']);
25643
25332
  }
25644
- return handleExportAndPrint(this, Object.assign({}, exportOpts, options));
25333
+ return handleExportAndPrint($xeTable, defOpts);
25645
25334
  },
25646
25335
  _closePrint: handleCloseExport,
25647
25336
  _openPrint(options) {
25648
- const {
25649
- printOpts
25650
- } = this;
25651
- if (!this.printConfig) {
25337
+ const $xeTable = this;
25338
+ const props = $xeTable;
25339
+ const printOpts = $xeTable.computePrintOpts;
25340
+ const defOpts = Object.assign({
25341
+ message: true
25342
+ }, printOpts, options);
25343
+ if (!props.printConfig) {
25652
25344
  errLog('vxe.error.reqProp', ['print-config']);
25653
25345
  }
25654
- return handleExportAndPrint(this, Object.assign({}, printOpts, options), true);
25346
+ return handleExportAndPrint($xeTable, defOpts, true);
25655
25347
  }
25656
25348
  }
25657
25349
  });
@@ -26313,32 +26005,107 @@ class Rule {
26313
26005
  return this.content;
26314
26006
  }
26315
26007
  }
26316
- function validErrorRuleValue(rule, val) {
26008
+ // 如果存在 pattern,判断正则
26009
+ function validREValue(pattern, val) {
26010
+ if (pattern && !(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isRegExp(pattern) ? pattern : new RegExp(pattern)).test(val)) {
26011
+ return false;
26012
+ }
26013
+ return true;
26014
+ }
26015
+ // 如果存在 max,判断最大值
26016
+ function validMaxValue(max, num) {
26017
+ if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(max) && num > external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(max)) {
26018
+ return false;
26019
+ }
26020
+ return true;
26021
+ }
26022
+ // 如果存在 min,判断最小值
26023
+ function validMinValue(min, num) {
26024
+ if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(min) && num < external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(min)) {
26025
+ return false;
26026
+ }
26027
+ return true;
26028
+ }
26029
+ function validRuleValue(rule, val, required) {
26317
26030
  const {
26318
26031
  type,
26319
26032
  min,
26320
26033
  max,
26321
26034
  pattern
26322
26035
  } = rule;
26036
+ const isArrType = type === 'array';
26323
26037
  const isNumType = type === 'number';
26324
- const numVal = isNumType ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(val) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getSize(val);
26325
- // 判断数值
26326
- if (isNumType && isNaN(val)) {
26327
- return true;
26328
- }
26329
- // 如果存在 min,判断最小值
26330
- if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(min) && numVal < external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(min)) {
26331
- return true;
26038
+ const isStrType = type === 'string';
26039
+ const strVal = `${val}`;
26040
+ if (!validREValue(pattern, strVal)) {
26041
+ return false;
26332
26042
  }
26333
- // 如果存在 max,判断最大值
26334
- if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(max) && numVal > external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(max)) {
26335
- return true;
26043
+ if (isArrType) {
26044
+ if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(val)) {
26045
+ return false;
26046
+ }
26047
+ if (required) {
26048
+ if (!val.length) {
26049
+ return false;
26050
+ }
26051
+ }
26052
+ if (!validMinValue(min, val.length)) {
26053
+ return false;
26054
+ }
26055
+ if (!validMaxValue(max, val.length)) {
26056
+ return false;
26057
+ }
26058
+ } else if (isNumType) {
26059
+ const numVal = Number(val);
26060
+ if (isNaN(numVal)) {
26061
+ return false;
26062
+ }
26063
+ if (!validMinValue(min, numVal)) {
26064
+ return false;
26065
+ }
26066
+ if (!validMaxValue(max, numVal)) {
26067
+ return false;
26068
+ }
26069
+ } else {
26070
+ if (isStrType) {
26071
+ if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(val)) {
26072
+ return false;
26073
+ }
26074
+ }
26075
+ if (required) {
26076
+ if (!strVal) {
26077
+ return false;
26078
+ }
26079
+ }
26080
+ if (!validMinValue(min, strVal.length)) {
26081
+ return false;
26082
+ }
26083
+ if (!validMaxValue(max, strVal.length)) {
26084
+ return false;
26085
+ }
26336
26086
  }
26337
- // 如果存在 pattern,正则校验
26338
- if (pattern && !(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isRegExp(pattern) ? pattern : new RegExp(pattern)).test(val)) {
26339
- return true;
26087
+ return true;
26088
+ }
26089
+ function checkRuleStatus(rule, val) {
26090
+ const {
26091
+ required
26092
+ } = rule;
26093
+ const isEmptyVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(val);
26094
+ if (required) {
26095
+ if (isEmptyVal) {
26096
+ return false;
26097
+ }
26098
+ if (!validRuleValue(rule, val, required)) {
26099
+ return false;
26100
+ }
26101
+ } else {
26102
+ if (!isEmptyVal) {
26103
+ if (!validRuleValue(rule, val, required)) {
26104
+ return false;
26105
+ }
26106
+ }
26340
26107
  }
26341
- return false;
26108
+ return true;
26342
26109
  }
26343
26110
  /* harmony default export */ var validator_mixin = ({
26344
26111
  methods: {
@@ -26346,10 +26113,8 @@ function validErrorRuleValue(rule, val) {
26346
26113
  * 完整校验,和 validate 的区别就是会给有效数据中的每一行进行校验
26347
26114
  */
26348
26115
  _fullValidate(rows, cb) {
26349
- if (true) {
26350
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(cb)) {
26351
- warnLog('vxe.error.notValidators', ['fullValidate(rows, callback)', 'fullValidate(rows)']);
26352
- }
26116
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(cb)) {
26117
+ warnLog('vxe.error.notValidators', ['fullValidate(rows, callback)', 'fullValidate(rows)']);
26353
26118
  }
26354
26119
  return this.beginValidate(rows, null, cb, true);
26355
26120
  },
@@ -26357,10 +26122,8 @@ function validErrorRuleValue(rule, val) {
26357
26122
  * 快速校验,如果存在记录不通过的记录,则返回不再继续校验(异步校验除外)
26358
26123
  */
26359
26124
  _validate(rows, cb) {
26360
- if (true) {
26361
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(cb)) {
26362
- warnLog('vxe.error.notValidators', ['validate(rows, callback)', 'validate(rows)']);
26363
- }
26125
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(cb)) {
26126
+ warnLog('vxe.error.notValidators', ['validate(rows, callback)', 'validate(rows)']);
26364
26127
  }
26365
26128
  return this.beginValidate(rows, null, cb);
26366
26129
  },
@@ -26621,9 +26384,7 @@ function validErrorRuleValue(rule, val) {
26621
26384
  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, property) : val;
26622
26385
  rules.forEach(rule => {
26623
26386
  const {
26624
- type,
26625
26387
  trigger,
26626
- required,
26627
26388
  validator
26628
26389
  } = rule;
26629
26390
  if (validType === 'all' || !trigger || validType === trigger) {
@@ -26647,9 +26408,7 @@ function validErrorRuleValue(rule, val) {
26647
26408
  if (tcvMethod) {
26648
26409
  customValid = tcvMethod(validParams);
26649
26410
  } else {
26650
- if (true) {
26651
- warnLog('vxe.error.notValidators', [validator]);
26652
- }
26411
+ errLog('vxe.error.notValidators', [validator]);
26653
26412
  }
26654
26413
  } else {
26655
26414
  errLog('vxe.error.notValidators', [validator]);
@@ -26680,17 +26439,7 @@ function validErrorRuleValue(rule, val) {
26680
26439
  }
26681
26440
  }
26682
26441
  } else {
26683
- const isArrType = type === 'array';
26684
- const isArrVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(cellValue);
26685
- let hasEmpty = true;
26686
- if (isArrType || isArrVal) {
26687
- hasEmpty = !isArrVal || !cellValue.length;
26688
- } else if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(cellValue)) {
26689
- hasEmpty = eqEmptyValue(cellValue.trim());
26690
- } else {
26691
- hasEmpty = eqEmptyValue(cellValue);
26692
- }
26693
- if (required ? hasEmpty || validErrorRuleValue(rule, cellValue) : !hasEmpty && validErrorRuleValue(rule, cellValue)) {
26442
+ if (!checkRuleStatus(rule, cellValue)) {
26694
26443
  this.validRuleErr = true;
26695
26444
  errorRules.push(new Rule(rule));
26696
26445
  }
@@ -28980,16 +28729,14 @@ function renderBody(h, $xeTable) {
28980
28729
  if (columnOpts.drag || rowOpts.drag || customOpts.allowSort) {
28981
28730
  initTpImg();
28982
28731
  }
28983
- if (true) {
28984
- const {
28985
- $listeners
28986
- } = this;
28987
- if (!this.menuConfig && ($listeners['menu-click'] || $listeners['cell-menu'] || $listeners['header-cell-menu'] || $listeners['footer-cell-menu'])) {
28988
- warnLog('vxe.error.reqProp', ['menu-config']);
28989
- }
28990
- if (!this.tooltipConfig && ($listeners['cell-mouseenter'] || $listeners['cell-mouseleave'])) {
28991
- warnLog('vxe.error.reqProp', ['tooltip-config']);
28992
- }
28732
+ const {
28733
+ $listeners
28734
+ } = this;
28735
+ if (!this.menuConfig && ($listeners['menu-click'] || $listeners['cell-menu'] || $listeners['header-cell-menu'] || $listeners['footer-cell-menu'])) {
28736
+ warnLog('vxe.error.reqProp', ['menu-config']);
28737
+ }
28738
+ if (!this.tooltipConfig && ($listeners['cell-mouseenter'] || $listeners['cell-mouseleave'])) {
28739
+ warnLog('vxe.error.reqProp', ['tooltip-config']);
28993
28740
  }
28994
28741
  // 使用已安装的组件,如果未安装则不渲染
28995
28742
  const VxeUILoadingComponent = core_.VxeUI.getComponent('VxeLoading');
@@ -30262,13 +30009,11 @@ function getToolbarSlots(_vm) {
30262
30009
  let buttonsSlot;
30263
30010
  let toolsSlot;
30264
30011
  const slots = {};
30265
- if (true) {
30266
- if ($scopedSlots.buttons && (!toolbarOptSlots || toolbarOptSlots.buttons !== 'buttons')) {
30267
- warnLog('vxe.error.reqProp', ['toolbar-config.slots.buttons']);
30268
- }
30269
- if ($scopedSlots.tools && (!toolbarOptSlots || toolbarOptSlots.tools !== 'tools')) {
30270
- warnLog('vxe.error.reqProp', ['toolbar-config.slots.tools']);
30271
- }
30012
+ if ($scopedSlots.buttons && (!toolbarOptSlots || toolbarOptSlots.buttons !== 'buttons')) {
30013
+ warnLog('vxe.error.reqProp', ['toolbar-config.slots.buttons']);
30014
+ }
30015
+ if ($scopedSlots.tools && (!toolbarOptSlots || toolbarOptSlots.tools !== 'tools')) {
30016
+ warnLog('vxe.error.reqProp', ['toolbar-config.slots.tools']);
30272
30017
  }
30273
30018
  if (toolbarOptSlots) {
30274
30019
  buttonsSlot = getFuncSlot(_vm, toolbarOptSlots, 'buttons');
@@ -30772,17 +30517,15 @@ Object.keys(table.methods).forEach(name => {
30772
30517
  // if (proxyConfig && (data || (proxyOpts.form && formOpts.data))) {
30773
30518
  // errLog('vxe.error.errConflicts', ['grid.data', 'grid.proxy-config'])
30774
30519
  // }
30775
- if (true) {
30776
- if (this.toolbar) {
30777
- warnLog('vxe.error.delProp', ['grid.toolbar', 'grid.toolbar-config']);
30778
- }
30779
- if (this.toolbarConfig && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isObject(this.toolbarConfig)) {
30780
- warnLog('vxe.error.errProp', [`grid.toolbar-config=${this.toolbarConfig}`, 'grid.toolbar-config={}']);
30781
- }
30782
- // if (proxyOpts.props) {
30783
- // warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
30784
- // }
30520
+ if (this.toolbar) {
30521
+ warnLog('vxe.error.delProp', ['grid.toolbar', 'grid.toolbar-config']);
30522
+ }
30523
+ if (this.toolbarConfig && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isObject(this.toolbarConfig)) {
30524
+ warnLog('vxe.error.errProp', [`grid.toolbar-config=${this.toolbarConfig}`, 'grid.toolbar-config={}']);
30785
30525
  }
30526
+ // if (proxyOpts.props) {
30527
+ // warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
30528
+ // }
30786
30529
  // 使用已安装的组件,如果未安装则不渲染
30787
30530
  const VxeUIFormComponent = core_.VxeUI.getComponent('VxeForm');
30788
30531
  const VxeUIPagerComponent = core_.VxeUI.getComponent('VxePager');
@@ -31672,12 +31415,12 @@ Object.keys(table.methods).forEach(name => {
31672
31415
  });
31673
31416
  },
31674
31417
  getProxyInfo() {
31418
+ const $xeGrid = this;
31419
+ const $xeTable = $xeGrid.$refs.xTable;
31675
31420
  const {
31676
- $refs,
31677
31421
  sortData,
31678
31422
  proxyConfig
31679
31423
  } = this;
31680
- const $xeTable = $refs.xTable;
31681
31424
  if (proxyConfig) {
31682
31425
  return {
31683
31426
  data: $xeTable ? $xeTable.getFullData() : [],
@@ -31691,30 +31434,30 @@ Object.keys(table.methods).forEach(name => {
31691
31434
  }
31692
31435
  return null;
31693
31436
  },
31694
- // 检查插槽
31695
- ...( true ? {
31696
- loadColumn(columns) {
31697
- const {
31698
- $scopedSlots
31699
- } = this;
31700
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(columns, column => {
31701
- if (column.slots) {
31702
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(column.slots, func => {
31703
- if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(func)) {
31704
- if (!$scopedSlots[func]) {
31705
- errLog('vxe.error.notSlot', [func]);
31706
- }
31437
+ loadColumn(columns) {
31438
+ const $xeGrid = this;
31439
+ const $xeTable = $xeGrid.$refs.xTable;
31440
+ const {
31441
+ $scopedSlots
31442
+ } = this;
31443
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(columns, column => {
31444
+ if (column.slots) {
31445
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(column.slots, func => {
31446
+ if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(func)) {
31447
+ if (!$scopedSlots[func]) {
31448
+ errLog('vxe.error.notSlot', [func]);
31707
31449
  }
31708
- });
31709
- }
31710
- });
31711
- return this.$refs.xTable.loadColumn(columns);
31712
- },
31713
- reloadColumn(columns) {
31714
- this.clearAll();
31715
- return this.loadColumn(columns);
31716
- }
31717
- } : 0)
31450
+ }
31451
+ });
31452
+ }
31453
+ });
31454
+ return $xeTable.loadColumn(columns);
31455
+ },
31456
+ reloadColumn(columns) {
31457
+ const $xeGrid = this;
31458
+ $xeGrid.clearAll();
31459
+ return $xeGrid.loadColumn(columns);
31460
+ }
31718
31461
  }
31719
31462
  });
31720
31463
  ;// CONCATENATED MODULE: ./packages/grid/index.ts