vxe-table 3.8.8 → 3.8.9-beta.0

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 (46) hide show
  1. package/lib/button/src/button.js +87 -41
  2. package/lib/button/src/button.min.js +1 -1
  3. package/lib/custom/src/panel.js +2 -16
  4. package/lib/custom/src/panel.min.js +1 -1
  5. package/lib/icon/style/style.css +1 -1
  6. package/lib/icon/style/style.min.css +1 -1
  7. package/lib/index.css +1 -1
  8. package/lib/index.umd.js +604 -709
  9. package/lib/index.umd.min.js +1 -1
  10. package/lib/input/style/style.css +6 -1
  11. package/lib/input/style/style.min.css +1 -1
  12. package/lib/style.css +1 -1
  13. package/lib/style.min.css +1 -1
  14. package/lib/table/src/columnInfo.js +2 -0
  15. package/lib/table/src/header.js +1 -1
  16. package/lib/table/src/header.min.js +1 -1
  17. package/lib/table/src/methods.js +454 -599
  18. package/lib/table/src/methods.min.js +1 -1
  19. package/lib/table/src/table.js +5 -3
  20. package/lib/table/src/table.min.js +1 -1
  21. package/lib/tools/log.js +1 -1
  22. package/lib/tools/log.min.js +1 -1
  23. package/lib/v-x-e-table/index.js +1 -1
  24. package/lib/v-x-e-table/index.min.js +1 -1
  25. package/lib/v-x-e-table/src/conf.js +1 -0
  26. package/lib/v-x-e-table/src/conf.min.js +1 -1
  27. package/lib/v-x-e-table/src/renderer.js +1 -0
  28. package/lib/v-x-e-table/src/renderer.min.js +1 -1
  29. package/lib/vxe-input/style/style.css +6 -1
  30. package/lib/vxe-input/style/style.min.css +1 -1
  31. package/package.json +1 -1
  32. package/packages/button/src/button.js +71 -31
  33. package/packages/custom/src/panel.js +2 -14
  34. package/packages/table/src/columnInfo.js +1 -1
  35. package/packages/table/src/header.js +1 -1
  36. package/packages/table/src/methods.js +140 -250
  37. package/packages/table/src/table.js +6 -4
  38. package/packages/v-x-e-table/src/conf.js +1 -0
  39. package/packages/v-x-e-table/src/renderer.js +1 -0
  40. package/styles/input.scss +6 -1
  41. /package/lib/icon/style/{iconfont.1719197379838.ttf → iconfont.1719319728613.ttf} +0 -0
  42. /package/lib/icon/style/{iconfont.1719197379838.woff → iconfont.1719319728613.woff} +0 -0
  43. /package/lib/icon/style/{iconfont.1719197379838.woff2 → iconfont.1719319728613.woff2} +0 -0
  44. /package/lib/{iconfont.1719197379838.ttf → iconfont.1719319728613.ttf} +0 -0
  45. /package/lib/{iconfont.1719197379838.woff → iconfont.1719319728613.woff} +0 -0
  46. /package/lib/{iconfont.1719197379838.woff2 → iconfont.1719319728613.woff2} +0 -0
@@ -18,10 +18,6 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
18
18
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
20
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
21
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
22
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
23
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
24
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
25
21
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
26
22
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
27
23
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -44,10 +40,7 @@ var calcHeight = _dom.default.calcHeight,
44
40
  isNodeElement = _dom.default.isNodeElement;
45
41
  var isWebkit = _dom.browse['-webkit'] && !_dom.browse.edge;
46
42
  var debounceScrollYDuration = _dom.browse.msie ? 80 : 20;
47
- var resizableStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_WIDTH';
48
- var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
49
- var fixedStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_FIXED';
50
- var sortStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_SORT';
43
+ var customStorageKey = 'VXE_CUSTOM_STORE';
51
44
 
52
45
  /**
53
46
  * 生成行的唯一主键
@@ -72,13 +65,21 @@ function getNextSortOrder(_vm, column) {
72
65
  var oIndex = orders.indexOf(currOrder) + 1;
73
66
  return orders[oIndex < orders.length ? oIndex : 0];
74
67
  }
75
- function getCustomStorageMap(key) {
68
+ var getCustomStorageMap = function getCustomStorageMap(id) {
76
69
  var version = _conf.default.version;
77
- var rest = _xeUtils.default.toStringJSON(localStorage.getItem(key));
78
- return rest && rest._v === version ? rest : {
70
+ var rest = _xeUtils.default.toStringJSON(localStorage.getItem(customStorageKey) || '');
71
+ var maps = rest && rest._v === version ? rest : {
79
72
  _v: version
80
73
  };
81
- }
74
+ return (id ? maps[id] : maps) || {};
75
+ };
76
+ var setCustomStorageMap = function setCustomStorageMap(id, data) {
77
+ var version = _conf.default.version;
78
+ var maps = getCustomStorageMap();
79
+ maps[id] = data || undefined;
80
+ maps._v = version;
81
+ localStorage.setItem(customStorageKey, _xeUtils.default.toJSONString(maps));
82
+ };
82
83
  var getRecoverRowMaps = function getRecoverRowMaps(_vm, keyMaps) {
83
84
  var fullAllDataRowIdData = _vm.fullAllDataRowIdData;
84
85
  var restKeys = {};
@@ -683,30 +684,33 @@ var Methods = {
683
684
  this.collectColumn = collectColumn;
684
685
  var tableFullColumn = getColumnList(collectColumn);
685
686
  this.tableFullColumn = tableFullColumn;
687
+ this._isLoading = true;
686
688
  this.initColumnSort();
687
- this.restoreCustomStorage();
688
- this.cacheColumnMap();
689
- this.parseColumns().then(function () {
690
- if (_this9.scrollXLoad) {
691
- _this9.loadScrollXData(true);
692
- }
693
- });
694
- this.clearMergeCells();
695
- this.clearMergeFooterItems();
696
- this.handleTableData(true);
697
- if (process.env.NODE_ENV === 'development') {
698
- if ((this.scrollXLoad || this.scrollYLoad) && this.expandColumn) {
699
- (0, _log.warnLog)('vxe.error.scrollErrProp', ['column.type=expand']);
700
- }
701
- }
702
- return this.$nextTick().then(function () {
703
- if (_this9.$toolbar) {
704
- _this9.$toolbar.syncUpdate({
705
- collectColumn: collectColumn,
706
- $table: _this9
707
- });
689
+ return Promise.resolve(this.restoreCustomStorage()).then(function () {
690
+ _this9._isLoading = false;
691
+ _this9.cacheColumnMap();
692
+ _this9.parseColumns().then(function () {
693
+ if (_this9.scrollXLoad) {
694
+ _this9.loadScrollXData(true);
695
+ }
696
+ });
697
+ _this9.clearMergeCells();
698
+ _this9.clearMergeFooterItems();
699
+ _this9.handleTableData(true);
700
+ if (process.env.NODE_ENV === 'development') {
701
+ if ((_this9.scrollXLoad || _this9.scrollYLoad) && _this9.expandColumn) {
702
+ (0, _log.warnLog)('vxe.error.scrollErrProp', ['column.type=expand']);
703
+ }
708
704
  }
709
- return _this9.recalculate();
705
+ return _this9.$nextTick().then(function () {
706
+ if (_this9.$toolbar) {
707
+ _this9.$toolbar.syncUpdate({
708
+ collectColumn: collectColumn,
709
+ $table: _this9
710
+ });
711
+ }
712
+ return _this9.recalculate();
713
+ });
710
714
  });
711
715
  },
712
716
  /**
@@ -800,6 +804,9 @@ var Methods = {
800
804
  }
801
805
  this.tableSourceData = sourceData;
802
806
  },
807
+ getParams: function getParams() {
808
+ return this.params;
809
+ },
803
810
  loadTreeChildren: function loadTreeChildren(row, childRecords) {
804
811
  var _this12 = this;
805
812
  var keepSource = this.keepSource,
@@ -1919,7 +1926,7 @@ var Methods = {
1919
1926
  _xeUtils.default.eachTree([targetColumn], function (column) {
1920
1927
  column.fixed = fixed;
1921
1928
  });
1922
- this.saveCustomFixed();
1929
+ this.saveCustomStore('update:fixed');
1923
1930
  return this.refreshColumn();
1924
1931
  }
1925
1932
  return this.$nextTick();
@@ -1934,7 +1941,7 @@ var Methods = {
1934
1941
  _xeUtils.default.eachTree([targetColumn], function (column) {
1935
1942
  column.fixed = null;
1936
1943
  });
1937
- this.saveCustomFixed();
1944
+ this.saveCustomStore('update:fixed');
1938
1945
  return this.refreshColumn();
1939
1946
  }
1940
1947
  return this.$nextTick();
@@ -2015,15 +2022,7 @@ var Methods = {
2015
2022
  }
2016
2023
  column.renderResizeWidth = column.renderWidth;
2017
2024
  });
2018
- if (opts.resizable) {
2019
- this.saveCustomResizable(true);
2020
- }
2021
- if (opts.sort) {
2022
- this.saveCustomSort(true);
2023
- }
2024
- if (opts.fixed) {
2025
- this.saveCustomFixed();
2026
- }
2025
+ this.saveCustomStore('reset');
2027
2026
  return this.handleCustom();
2028
2027
  },
2029
2028
  handleCustom: function handleCustom() {
@@ -2037,142 +2036,33 @@ var Methods = {
2037
2036
  this.clearCopyCellArea();
2038
2037
  }
2039
2038
  }
2040
- this.saveCustomStore();
2041
2039
  this.analyColumnWidth();
2042
2040
  return this.refreshColumn(true);
2043
2041
  },
2044
- /**
2045
- * 还原自定义列操作状态
2046
- */
2047
- restoreCustomStorage: function restoreCustomStorage() {
2048
- var id = this.id,
2049
- customConfig = this.customConfig,
2050
- customOpts = this.customOpts;
2051
- var storage = customOpts.storage,
2052
- restoreStore = customOpts.restoreStore;
2053
- var isAllStorage = storage === true;
2054
- var storageOpts = isAllStorage ? {} : Object.assign({}, storage || {});
2055
- var isCustomResizable = isAllStorage || storageOpts.resizable;
2056
- var isCustomVisible = isAllStorage || storageOpts.visible;
2057
- var isCustomFixed = isAllStorage || storageOpts.fixed;
2058
- var isCustomSort = isAllStorage || storageOpts.sort;
2059
- if (storage && id && restoreStore) {
2060
- restoreStore({
2061
- id: id
2062
- });
2063
- }
2064
- if (customConfig && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
2065
- var customMap = {};
2066
- if (!id) {
2067
- (0, _log.errLog)('vxe.error.reqProp', ['id']);
2068
- return;
2069
- }
2070
- if (isCustomResizable) {
2071
- var columnWidthStorage = getCustomStorageMap(resizableStorageKey)[id];
2072
- if (columnWidthStorage) {
2073
- _xeUtils.default.each(columnWidthStorage, function (resizeWidth, field) {
2074
- customMap[field] = {
2075
- field: field,
2076
- resizeWidth: resizeWidth
2077
- };
2078
- });
2079
- }
2080
- }
2081
- // 自定义固定列
2082
- if (isCustomFixed) {
2083
- var columnFixedStorage = getCustomStorageMap(fixedStorageKey)[id];
2084
- if (columnFixedStorage) {
2085
- var colFixeds = columnFixedStorage.split(',');
2086
- colFixeds.forEach(function (fixConf) {
2087
- var _fixConf$split = fixConf.split('|'),
2088
- _fixConf$split2 = _slicedToArray(_fixConf$split, 2),
2089
- field = _fixConf$split2[0],
2090
- fixed = _fixConf$split2[1];
2091
- if (customMap[field]) {
2092
- customMap[field].fixed = fixed;
2093
- } else {
2094
- customMap[field] = {
2095
- field: field,
2096
- fixed: fixed
2097
- };
2098
- }
2099
- });
2100
- }
2101
- }
2102
- // 自定义顺序
2103
- var hasCustomSort = false;
2104
- if (isCustomSort) {
2105
- var columnSortStorage = getCustomStorageMap(sortStorageKey)[id];
2106
- if (columnSortStorage) {
2107
- _xeUtils.default.each(columnSortStorage, function (renderSortNumber, colKey) {
2108
- if (customMap[colKey]) {
2109
- customMap[colKey].renderSortNumber = renderSortNumber;
2110
- } else {
2111
- customMap[colKey] = {
2112
- renderSortNumber: renderSortNumber
2113
- };
2114
- }
2115
- if (!hasCustomSort) {
2116
- hasCustomSort = true;
2117
- }
2118
- });
2042
+ handleCustomRestore: function handleCustomRestore(storeData) {
2043
+ var tableFullColumn = this.tableFullColumn;
2044
+ var collectColumn = this.collectColumn;
2045
+ var resizableData = storeData.resizableData,
2046
+ sortData = storeData.sortData,
2047
+ visibleData = storeData.visibleData,
2048
+ fixedData = storeData.fixedData;
2049
+ var hasCustomSort = false;
2050
+ // 处理还原
2051
+ if (resizableData || sortData || visibleData || fixedData) {
2052
+ tableFullColumn.forEach(function (column) {
2053
+ var colKey = column.getKey();
2054
+ if (resizableData && _xeUtils.default.isNumber(resizableData[colKey])) {
2055
+ column.resizeWidth = resizableData[colKey];
2119
2056
  }
2120
- }
2121
- if (isCustomVisible) {
2122
- var columnVisibleStorage = getCustomStorageMap(visibleStorageKey)[id];
2123
- if (columnVisibleStorage) {
2124
- var colVisibles = columnVisibleStorage.split('|');
2125
- var colHides = colVisibles[0] ? colVisibles[0].split(',') : [];
2126
- var colShows = colVisibles[1] ? colVisibles[1].split(',') : [];
2127
- colHides.forEach(function (field) {
2128
- if (customMap[field]) {
2129
- customMap[field].visible = false;
2130
- } else {
2131
- customMap[field] = {
2132
- field: field,
2133
- visible: false
2134
- };
2135
- }
2136
- });
2137
- colShows.forEach(function (field) {
2138
- if (customMap[field]) {
2139
- customMap[field].visible = true;
2140
- } else {
2141
- customMap[field] = {
2142
- field: field,
2143
- visible: true
2144
- };
2145
- }
2146
- });
2057
+ if (visibleData && _xeUtils.default.isBoolean(visibleData[colKey])) {
2058
+ column.visible = visibleData[colKey];
2147
2059
  }
2148
- }
2149
- var collectColumn = this.collectColumn;
2150
- var keyMap = {};
2151
- _xeUtils.default.eachTree(collectColumn, function (column) {
2152
- var colKey = column.getKey();
2153
- if (colKey) {
2154
- keyMap[colKey] = column;
2060
+ if (fixedData && fixedData[colKey]) {
2061
+ column.fixed = fixedData[colKey];
2155
2062
  }
2156
- });
2157
- _xeUtils.default.each(customMap, function (_ref5, field) {
2158
- var visible = _ref5.visible,
2159
- resizeWidth = _ref5.resizeWidth,
2160
- fixed = _ref5.fixed,
2161
- renderSortNumber = _ref5.renderSortNumber;
2162
- var column = keyMap[field];
2163
- if (column) {
2164
- if (_xeUtils.default.isNumber(resizeWidth)) {
2165
- column.resizeWidth = resizeWidth;
2166
- }
2167
- if (_xeUtils.default.isBoolean(visible)) {
2168
- column.visible = visible;
2169
- }
2170
- if (fixed) {
2171
- column.fixed = fixed;
2172
- }
2173
- if (renderSortNumber) {
2174
- column.renderSortNumber = Number(renderSortNumber);
2175
- }
2063
+ if (sortData && _xeUtils.default.isNumber(sortData[colKey])) {
2064
+ hasCustomSort = true;
2065
+ column.renderSortNumber = sortData[colKey];
2176
2066
  }
2177
2067
  });
2178
2068
  // 如果自定义了顺序
@@ -2183,98 +2073,76 @@ var Methods = {
2183
2073
  }
2184
2074
  }
2185
2075
  },
2186
- saveCustomFixed: function saveCustomFixed() {
2076
+ /**
2077
+ * 还原自定义列操作状态
2078
+ */
2079
+ restoreCustomStorage: function restoreCustomStorage() {
2080
+ var _this21 = this;
2187
2081
  var id = this.id,
2188
- collectColumn = this.collectColumn,
2189
2082
  customConfig = this.customConfig,
2190
2083
  customOpts = this.customOpts;
2191
- var storage = customOpts.storage;
2192
- var isAllStorage = storage === true;
2193
- var storageOpts = isAllStorage ? {} : Object.assign({}, storage || {});
2194
- var isCustomFixed = isAllStorage || storageOpts.fixed;
2195
- if (customConfig && isCustomFixed) {
2196
- var columnFixedStorageMap = getCustomStorageMap(fixedStorageKey);
2197
- var colFixeds = [];
2084
+ var storage = customOpts.storage,
2085
+ restoreStore = customOpts.restoreStore;
2086
+ var isAllCustom = storage === true;
2087
+ var storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
2088
+ var isCustomResizable = isAllCustom || storageOpts.resizable;
2089
+ var isCustomVisible = isAllCustom || storageOpts.visible;
2090
+ var isCustomFixed = isAllCustom || storageOpts.fixed;
2091
+ var isCustomSort = isAllCustom || storageOpts.sort;
2092
+ if (customConfig && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
2198
2093
  if (!id) {
2199
2094
  (0, _log.errLog)('vxe.error.reqProp', ['id']);
2200
2095
  return;
2201
2096
  }
2202
- _xeUtils.default.eachTree(collectColumn, function (column) {
2203
- if (column.fixed && column.fixed !== column.defaultFixed) {
2204
- var colKey = column.getKey();
2205
- if (colKey) {
2206
- colFixeds.push("".concat(colKey, "|").concat(column.fixed));
2097
+ var storeData = getCustomStorageMap(id);
2098
+ if (restoreStore) {
2099
+ return Promise.resolve(restoreStore({
2100
+ id: id,
2101
+ type: 'restore',
2102
+ storeData: storeData
2103
+ })).then(function (storeData) {
2104
+ if (!storeData) {
2105
+ return;
2207
2106
  }
2208
- }
2209
- });
2210
- columnFixedStorageMap[id] = colFixeds.join(',') || undefined;
2211
- localStorage.setItem(fixedStorageKey, _xeUtils.default.toJSONString(columnFixedStorageMap));
2212
- }
2213
- },
2214
- saveCustomVisible: function saveCustomVisible() {
2215
- var id = this.id,
2216
- collectColumn = this.collectColumn,
2217
- customConfig = this.customConfig,
2218
- customOpts = this.customOpts;
2219
- var checkMethod = customOpts.checkMethod,
2220
- storage = customOpts.storage;
2221
- var isAllStorage = storage === true;
2222
- var storageOpts = isAllStorage ? {} : Object.assign({}, storage || {});
2223
- var isCustomVisible = isAllStorage || storageOpts.visible;
2224
- if (customConfig && isCustomVisible) {
2225
- var columnVisibleStorageMap = getCustomStorageMap(visibleStorageKey);
2226
- var colHides = [];
2227
- var colShows = [];
2228
- if (!id) {
2229
- (0, _log.errLog)('vxe.error.reqProp', ['id']);
2230
- return;
2107
+ return _this21.handleCustomRestore(storeData);
2108
+ }).catch(function (e) {
2109
+ return e;
2110
+ });
2111
+ } else {
2112
+ return this.handleCustomRestore(storeData);
2231
2113
  }
2232
- _xeUtils.default.eachTree(collectColumn, function (column) {
2233
- if (!checkMethod || checkMethod({
2234
- column: column
2235
- })) {
2236
- if (!column.visible && column.defaultVisible) {
2237
- var colKey = column.getKey();
2238
- if (colKey) {
2239
- colHides.push(colKey);
2240
- }
2241
- } else if (column.visible && !column.defaultVisible) {
2242
- var _colKey = column.getKey();
2243
- if (_colKey) {
2244
- colShows.push(_colKey);
2245
- }
2246
- }
2247
- }
2248
- });
2249
- columnVisibleStorageMap[id] = [colHides.join(',')].concat(colShows.length ? [colShows.join(',')] : []).join('|') || undefined;
2250
- localStorage.setItem(visibleStorageKey, _xeUtils.default.toJSONString(columnVisibleStorageMap));
2251
2114
  }
2252
2115
  },
2253
2116
  getCustomStoreData: function getCustomStoreData() {
2254
2117
  var id = this.id,
2255
- collectColumn = this.collectColumn,
2256
- customOpts = this.customOpts;
2118
+ customOpts = this.customOpts,
2119
+ collectColumn = this.collectColumn;
2257
2120
  var checkMethod = customOpts.checkMethod;
2258
2121
  var resizableData = {};
2259
2122
  var sortData = {};
2260
2123
  var visibleData = {};
2261
2124
  var fixedData = {};
2262
2125
  var storeData = {
2263
- resizableData: resizableData,
2264
- sortData: sortData,
2265
- visibleData: visibleData,
2266
- fixedData: fixedData
2126
+ resizableData: undefined,
2127
+ sortData: undefined,
2128
+ visibleData: undefined,
2129
+ fixedData: undefined
2267
2130
  };
2268
2131
  if (!id) {
2269
2132
  (0, _log.errLog)('vxe.error.reqProp', ['id']);
2270
2133
  return storeData;
2271
2134
  }
2135
+ var hasResizable = 0;
2136
+ var hasSort = 0;
2137
+ var hasFixedt = 0;
2138
+ var hasVisible = 0;
2272
2139
  _xeUtils.default.eachTree(collectColumn, function (column, index, items, path, parent) {
2273
2140
  // 排序只支持一级
2274
2141
  if (!parent) {
2275
2142
  collectColumn.forEach(function (column) {
2276
2143
  var colKey = column.getKey();
2277
2144
  if (colKey) {
2145
+ hasSort = 1;
2278
2146
  sortData[colKey] = column.renderSortNumber;
2279
2147
  }
2280
2148
  });
@@ -2282,99 +2150,82 @@ var Methods = {
2282
2150
  if (column.resizeWidth) {
2283
2151
  var colKey = column.getKey();
2284
2152
  if (colKey) {
2153
+ hasResizable = 1;
2285
2154
  resizableData[colKey] = column.renderWidth;
2286
2155
  }
2287
2156
  }
2288
2157
  if (column.fixed && column.fixed !== column.defaultFixed) {
2289
- var _colKey2 = column.getKey();
2290
- if (_colKey2) {
2291
- fixedData[_colKey2] = column.fixed;
2158
+ var _colKey = column.getKey();
2159
+ if (_colKey) {
2160
+ hasFixedt = 1;
2161
+ fixedData[_colKey] = column.fixed;
2292
2162
  }
2293
2163
  }
2294
2164
  if (!checkMethod || checkMethod({
2295
2165
  column: column
2296
2166
  })) {
2297
2167
  if (!column.visible && column.defaultVisible) {
2298
- var _colKey3 = column.getKey();
2299
- if (_colKey3) {
2300
- visibleData[_colKey3] = false;
2168
+ var _colKey2 = column.getKey();
2169
+ if (_colKey2) {
2170
+ hasVisible = 1;
2171
+ visibleData[_colKey2] = false;
2301
2172
  }
2302
2173
  } else if (column.visible && !column.defaultVisible) {
2303
- var _colKey4 = column.getKey();
2304
- if (_colKey4) {
2305
- visibleData[_colKey4] = true;
2174
+ var _colKey3 = column.getKey();
2175
+ if (_colKey3) {
2176
+ hasVisible = 1;
2177
+ visibleData[_colKey3] = true;
2306
2178
  }
2307
2179
  }
2308
2180
  }
2309
2181
  });
2310
- return storeData;
2311
- },
2312
- saveCustomStore: function saveCustomStore() {
2313
- this.saveCustomVisible();
2314
- this.saveCustomSort();
2315
- this.saveCustomFixed();
2316
- this.saveCustomResizable();
2317
- },
2318
- saveCustomResizable: function saveCustomResizable(isReset) {
2319
- var id = this.id,
2320
- collectColumn = this.collectColumn,
2321
- customConfig = this.customConfig,
2322
- customOpts = this.customOpts;
2323
- var storage = customOpts.storage;
2324
- var isAllStorage = storage === true;
2325
- var storageOpts = isAllStorage ? {} : Object.assign({}, storage || {});
2326
- var isResizable = isAllStorage || storageOpts.resizable;
2327
- if (customConfig && isResizable) {
2328
- var columnWidthStorageMap = getCustomStorageMap(resizableStorageKey);
2329
- var columnWidthStorage;
2330
- if (!id) {
2331
- (0, _log.errLog)('vxe.error.reqProp', ['id']);
2332
- return;
2333
- }
2334
- if (!isReset) {
2335
- columnWidthStorage = _xeUtils.default.isPlainObject(columnWidthStorageMap[id]) ? columnWidthStorageMap[id] : {};
2336
- _xeUtils.default.eachTree(collectColumn, function (column) {
2337
- if (column.resizeWidth) {
2338
- var colKey = column.getKey();
2339
- if (colKey) {
2340
- columnWidthStorage[colKey] = column.renderWidth;
2341
- }
2342
- }
2343
- });
2344
- }
2345
- columnWidthStorageMap[id] = _xeUtils.default.isEmpty(columnWidthStorage) ? undefined : columnWidthStorage;
2346
- localStorage.setItem(resizableStorageKey, _xeUtils.default.toJSONString(columnWidthStorageMap));
2182
+ if (hasResizable) {
2183
+ storeData.resizableData = resizableData;
2184
+ }
2185
+ if (hasSort) {
2186
+ storeData.sortData = sortData;
2187
+ }
2188
+ if (hasFixedt) {
2189
+ storeData.fixedData = fixedData;
2190
+ }
2191
+ if (hasVisible) {
2192
+ storeData.visibleData = visibleData;
2347
2193
  }
2194
+ return storeData;
2348
2195
  },
2349
- saveCustomSort: function saveCustomSort(isReset) {
2196
+ saveCustomStore: function saveCustomStore(type) {
2350
2197
  var id = this.id,
2351
- collectColumn = this.collectColumn,
2352
- customConfig = this.customConfig,
2353
2198
  customOpts = this.customOpts;
2354
- var storage = customOpts.storage;
2355
- var isAllStorage = storage === true;
2356
- var storageOpts = isAllStorage ? {} : Object.assign({}, storage || {});
2357
- var isSort = isAllStorage || storageOpts.sort;
2358
- if (customConfig && isSort) {
2359
- var columnSortStorageMap = getCustomStorageMap(sortStorageKey);
2360
- var columnWidthStorage;
2199
+ var updateStore = customOpts.updateStore,
2200
+ storage = customOpts.storage;
2201
+ var isAllCustom = storage === true;
2202
+ var storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
2203
+ var isCustomResizable = isAllCustom || storageOpts.resizable;
2204
+ var isCustomVisible = isAllCustom || storageOpts.visible;
2205
+ var isCustomFixed = isAllCustom || storageOpts.fixed;
2206
+ var isCustomSort = isAllCustom || storageOpts.sort;
2207
+ if (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort) {
2361
2208
  if (!id) {
2362
2209
  (0, _log.errLog)('vxe.error.reqProp', ['id']);
2363
- return;
2210
+ return this.$nextTick();
2364
2211
  }
2365
- if (!isReset) {
2366
- columnWidthStorage = _xeUtils.default.isPlainObject(columnSortStorageMap[id]) ? columnSortStorageMap[id] : {};
2367
- // 排序只支持一级
2368
- collectColumn.forEach(function (column) {
2369
- var colKey = column.getKey();
2370
- if (colKey) {
2371
- columnWidthStorage[colKey] = column.renderSortNumber;
2372
- }
2212
+ var storeData = type === 'reset' ? {
2213
+ resizableData: {},
2214
+ sortData: {},
2215
+ visibleData: {},
2216
+ fixedData: {}
2217
+ } : this.getCustomStoreData();
2218
+ if (updateStore) {
2219
+ return updateStore({
2220
+ id: id,
2221
+ type: type,
2222
+ storeData: storeData
2373
2223
  });
2224
+ } else {
2225
+ setCustomStorageMap(id, type === 'reset' ? null : storeData);
2374
2226
  }
2375
- columnSortStorageMap[id] = _xeUtils.default.isEmpty(columnWidthStorage) ? undefined : columnWidthStorage;
2376
- localStorage.setItem(sortStorageKey, _xeUtils.default.toJSONString(columnSortStorageMap));
2377
2227
  }
2228
+ return this.$nextTick();
2378
2229
  },
2379
2230
  handleUpdateDataQueue: function handleUpdateDataQueue() {
2380
2231
  this.upDataFlag++;
@@ -2386,7 +2237,7 @@ var Methods = {
2386
2237
  * 刷新列配置
2387
2238
  */
2388
2239
  refreshColumn: function refreshColumn(resiveOrder) {
2389
- var _this21 = this;
2240
+ var _this22 = this;
2390
2241
  if (resiveOrder) {
2391
2242
  var columnList = _xeUtils.default.orderBy(this.collectColumn, 'renderSortNumber');
2392
2243
  this.collectColumn = columnList;
@@ -2395,9 +2246,9 @@ var Methods = {
2395
2246
  this.cacheColumnMap();
2396
2247
  }
2397
2248
  return this.parseColumns().then(function () {
2398
- return _this21.refreshScroll();
2249
+ return _this22.refreshScroll();
2399
2250
  }).then(function () {
2400
- return _this21.recalculate();
2251
+ return _this22.recalculate();
2401
2252
  });
2402
2253
  },
2403
2254
  /**
@@ -2405,7 +2256,7 @@ var Methods = {
2405
2256
  * 将固定的列左边、右边分别靠边
2406
2257
  */
2407
2258
  parseColumns: function parseColumns() {
2408
- var _this22 = this;
2259
+ var _this23 = this;
2409
2260
  var leftList = [];
2410
2261
  var centerList = [];
2411
2262
  var rightList = [];
@@ -2511,10 +2362,10 @@ var Methods = {
2511
2362
  this.visibleColumn = visibleColumn;
2512
2363
  this.handleTableColumn();
2513
2364
  return this.updateFooter().then(function () {
2514
- return _this22.recalculate();
2365
+ return _this23.recalculate();
2515
2366
  }).then(function () {
2516
- _this22.updateCellAreas();
2517
- return _this22.recalculate();
2367
+ _this23.updateCellAreas();
2368
+ return _this23.recalculate();
2518
2369
  });
2519
2370
  },
2520
2371
  /**
@@ -2566,7 +2417,7 @@ var Methods = {
2566
2417
  * 刷新滚动操作,手动同步滚动相关位置(对于某些特殊的操作,比如滚动条错位、固定列不同步)
2567
2418
  */
2568
2419
  refreshScroll: function refreshScroll() {
2569
- var _this23 = this;
2420
+ var _this24 = this;
2570
2421
  var lastScrollLeft = this.lastScrollLeft,
2571
2422
  lastScrollTop = this.lastScrollTop;
2572
2423
  var $refs = this.$refs;
@@ -2581,7 +2432,7 @@ var Methods = {
2581
2432
  return new Promise(function (resolve) {
2582
2433
  // 还原滚动条位置
2583
2434
  if (lastScrollLeft || lastScrollTop) {
2584
- return (0, _util.restoreScrollLocation)(_this23, lastScrollLeft, lastScrollTop).then(function () {
2435
+ return (0, _util.restoreScrollLocation)(_this24, lastScrollLeft, lastScrollTop).then(function () {
2585
2436
  // 存在滚动行为未结束情况
2586
2437
  setTimeout(resolve, 30);
2587
2438
  });
@@ -2600,7 +2451,7 @@ var Methods = {
2600
2451
  * 支持 width=? width=?px width=?% min-width=? min-width=?px min-width=?%
2601
2452
  */
2602
2453
  recalculate: function recalculate(refull) {
2603
- var _this24 = this;
2454
+ var _this25 = this;
2604
2455
  var $refs = this.$refs;
2605
2456
  var tableBody = $refs.tableBody,
2606
2457
  tableHeader = $refs.tableHeader,
@@ -2613,8 +2464,8 @@ var Methods = {
2613
2464
  if (refull === true) {
2614
2465
  // 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
2615
2466
  return this.computeScrollLoad().then(function () {
2616
- _this24.autoCellWidth(headerElem, bodyElem, footerElem);
2617
- return _this24.computeScrollLoad();
2467
+ _this25.autoCellWidth(headerElem, bodyElem, footerElem);
2468
+ return _this25.computeScrollLoad();
2618
2469
  });
2619
2470
  }
2620
2471
  }
@@ -2749,7 +2600,7 @@ var Methods = {
2749
2600
  this.customMaxHeight = calcHeight(this, 'maxHeight');
2750
2601
  },
2751
2602
  updateStyle: function updateStyle() {
2752
- var _this25 = this;
2603
+ var _this26 = this;
2753
2604
  var $refs = this.$refs,
2754
2605
  isGroup = this.isGroup,
2755
2606
  fullColumnIdData = this.fullColumnIdData,
@@ -2838,7 +2689,7 @@ var Methods = {
2838
2689
  var listElem = elemStore["".concat(name, "-").concat(layout, "-list")];
2839
2690
  if (isGroup && listElem) {
2840
2691
  _xeUtils.default.arrayEach(listElem.querySelectorAll('.col--group'), function (thElem) {
2841
- var colNode = _this25.getColumnNode(thElem);
2692
+ var colNode = _this26.getColumnNode(thElem);
2842
2693
  if (colNode) {
2843
2694
  var column = colNode.item;
2844
2695
  var showHeaderOverflow = column.showHeaderOverflow;
@@ -2909,7 +2760,7 @@ var Methods = {
2909
2760
  // 如果是使用优化模式
2910
2761
  if (fixedType) {
2911
2762
  // 如果存在展开行使用全量渲染
2912
- if (!_this25.expandColumn && (scrollXLoad || scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow))) {
2763
+ if (!_this26.expandColumn && (scrollXLoad || scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow))) {
2913
2764
  if (!mergeList.length && !spanMethod && !(keyboardConfig && keyboardOpts.isMerge)) {
2914
2765
  _renderColumnList = fixedColumn;
2915
2766
  } else {
@@ -2937,7 +2788,7 @@ var Methods = {
2937
2788
  // 如果是使用优化模式
2938
2789
  if (fixedType) {
2939
2790
  // 如果存在展开行使用全量渲染
2940
- if (!_this25.expandColumn && (scrollXLoad || allColumnFooterOverflow)) {
2791
+ if (!_this26.expandColumn && (scrollXLoad || allColumnFooterOverflow)) {
2941
2792
  if (!mergeFooterList.length || !footerSpanMethod) {
2942
2793
  _renderColumnList2 = fixedColumn;
2943
2794
  } else {
@@ -3004,9 +2855,9 @@ var Methods = {
3004
2855
  var colWidth = column.renderWidth;
3005
2856
  if (cellElem) {
3006
2857
  if (colspan > 1) {
3007
- var columnIndex = _this25.getColumnIndex(column);
2858
+ var columnIndex = _this26.getColumnIndex(column);
3008
2859
  for (var _index = 1; _index < colspan; _index++) {
3009
- var nextColumn = _this25.getColumns(columnIndex + _index);
2860
+ var nextColumn = _this26.getColumns(columnIndex + _index);
3010
2861
  if (nextColumn) {
3011
2862
  colWidth += nextColumn.renderWidth;
3012
2863
  }
@@ -3048,7 +2899,7 @@ var Methods = {
3048
2899
  }
3049
2900
  },
3050
2901
  preventEvent: function preventEvent(evnt, type, args, next, end) {
3051
- var _this26 = this;
2902
+ var _this27 = this;
3052
2903
  var evntList = _vXETable.default.interceptor.get(type);
3053
2904
 
3054
2905
  // 兼容老版本
@@ -3065,8 +2916,8 @@ var Methods = {
3065
2916
  var rest;
3066
2917
  if (!evntList.some(function (func) {
3067
2918
  return func(Object.assign({
3068
- $grid: _this26.$xegrid,
3069
- $table: _this26,
2919
+ $grid: _this27.$xegrid,
2920
+ $table: _this27,
3070
2921
  $event: evnt
3071
2922
  }, args)) === false;
3072
2923
  })) {
@@ -3083,7 +2934,7 @@ var Methods = {
3083
2934
  * 全局按下事件处理
3084
2935
  */
3085
2936
  handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
3086
- var _this27 = this;
2937
+ var _this28 = this;
3087
2938
  var $el = this.$el,
3088
2939
  $refs = this.$refs,
3089
2940
  $xegrid = this.$xegrid,
@@ -3124,7 +2975,7 @@ var Methods = {
3124
2975
  } else {
3125
2976
  if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
3126
2977
  this.preventEvent(evnt, 'event.clearCustom', {}, function () {
3127
- return _this27.closeCustom();
2978
+ return _this28.closeCustom();
3128
2979
  });
3129
2980
  }
3130
2981
  }
@@ -3160,7 +3011,7 @@ var Methods = {
3160
3011
  isClear = getEventTargetNode(evnt, $el, 'vxe-footer--row').flag;
3161
3012
  }
3162
3013
  // 如果固定了高度且点击了行之外的空白处,则清除激活状态
3163
- if (!isClear && _this27.height && !_this27.overflowY) {
3014
+ if (!isClear && _this28.height && !_this28.overflowY) {
3164
3015
  var bodyWrapperElem = evnt.target;
3165
3016
  if (hasClass(bodyWrapperElem, 'vxe-table--body-wrapper')) {
3166
3017
  isClear = evnt.offsetY < bodyWrapperElem.clientHeight;
@@ -3170,7 +3021,7 @@ var Methods = {
3170
3021
  // 如果点击了当前表格之外
3171
3022
  !getEventTargetNode(evnt, $el).flag) {
3172
3023
  setTimeout(function () {
3173
- return _this27.clearEdit(evnt);
3024
+ return _this28.clearEdit(evnt);
3174
3025
  });
3175
3026
  }
3176
3027
  });
@@ -3184,10 +3035,14 @@ var Methods = {
3184
3035
  this.clearSelected();
3185
3036
  }
3186
3037
  if (areaOpts.autoClear) {
3187
- if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-areas-clear').flag) {
3038
+ var cellAreas = this.getCellAreas();
3039
+ if (cellAreas.length && !getEventTargetNode(evnt, document.body, 'vxe-table--ignore-areas-clear').flag) {
3188
3040
  this.preventEvent(evnt, 'event.clearAreas', {}, function () {
3189
- _this27.clearCellAreas();
3190
- _this27.clearCopyCellArea();
3041
+ _this28.clearCellAreas();
3042
+ _this28.clearCopyCellArea();
3043
+ _this28.emitEvent('clear-cell-area-selection', {
3044
+ cellAreas: cellAreas
3045
+ }, evnt);
3191
3046
  });
3192
3047
  }
3193
3048
  }
@@ -3223,7 +3078,7 @@ var Methods = {
3223
3078
  * 表格键盘事件
3224
3079
  */
3225
3080
  keydownEvent: function keydownEvent(evnt) {
3226
- var _this28 = this;
3081
+ var _this29 = this;
3227
3082
  var filterStore = this.filterStore,
3228
3083
  ctxMenuStore = this.ctxMenuStore,
3229
3084
  editStore = this.editStore,
@@ -3236,30 +3091,30 @@ var Methods = {
3236
3091
  var isEsc = keyCode === 27;
3237
3092
  if (isEsc) {
3238
3093
  this.preventEvent(evnt, 'event.keydown', null, function () {
3239
- _this28.emitEvent('keydown-start', {}, evnt);
3240
- if (keyboardConfig && mouseConfig && mouseOpts.area && _this28.handleKeyboardEvent) {
3241
- _this28.handleKeyboardEvent(evnt);
3094
+ _this29.emitEvent('keydown-start', {}, evnt);
3095
+ if (keyboardConfig && mouseConfig && mouseOpts.area && _this29.handleKeyboardEvent) {
3096
+ _this29.handleKeyboardEvent(evnt);
3242
3097
  } else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
3243
3098
  evnt.stopPropagation();
3244
3099
  // 如果按下了 Esc 键,关闭快捷菜单、筛选
3245
- _this28.closeFilter();
3246
- _this28.closeMenu();
3100
+ _this29.closeFilter();
3101
+ _this29.closeMenu();
3247
3102
  if (keyboardConfig && keyboardOpts.isEsc) {
3248
3103
  // 如果是激活编辑状态,则取消编辑
3249
3104
  if (actived.row) {
3250
3105
  var params = actived.args;
3251
- _this28.clearEdit(evnt);
3106
+ _this29.clearEdit(evnt);
3252
3107
  // 如果配置了选中功能,则为选中状态
3253
3108
  if (mouseConfig && mouseOpts.selected) {
3254
- _this28.$nextTick(function () {
3255
- return _this28.handleSelected(params, evnt);
3109
+ _this29.$nextTick(function () {
3110
+ return _this29.handleSelected(params, evnt);
3256
3111
  });
3257
3112
  }
3258
3113
  }
3259
3114
  }
3260
3115
  }
3261
- _this28.emitEvent('keydown', {}, evnt);
3262
- _this28.emitEvent('keydown-end', {}, evnt);
3116
+ _this29.emitEvent('keydown', {}, evnt);
3117
+ _this29.emitEvent('keydown-end', {}, evnt);
3263
3118
  });
3264
3119
  }
3265
3120
  },
@@ -3267,26 +3122,26 @@ var Methods = {
3267
3122
  * 全局键盘事件
3268
3123
  */
3269
3124
  handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
3270
- var _this29 = this;
3125
+ var _this30 = this;
3271
3126
  // 该行为只对当前激活的表格有效
3272
3127
  if (this.isActivated) {
3273
3128
  this.preventEvent(evnt, 'event.keydown', null, function () {
3274
- var filterStore = _this29.filterStore,
3275
- isCtxMenu = _this29.isCtxMenu,
3276
- ctxMenuStore = _this29.ctxMenuStore,
3277
- editStore = _this29.editStore,
3278
- editOpts = _this29.editOpts,
3279
- editConfig = _this29.editConfig,
3280
- mouseConfig = _this29.mouseConfig,
3281
- mouseOpts = _this29.mouseOpts,
3282
- keyboardConfig = _this29.keyboardConfig,
3283
- keyboardOpts = _this29.keyboardOpts,
3284
- treeConfig = _this29.treeConfig,
3285
- treeOpts = _this29.treeOpts,
3286
- highlightCurrentRow = _this29.highlightCurrentRow,
3287
- currentRow = _this29.currentRow,
3288
- bodyCtxMenu = _this29.bodyCtxMenu,
3289
- rowOpts = _this29.rowOpts;
3129
+ var filterStore = _this30.filterStore,
3130
+ isCtxMenu = _this30.isCtxMenu,
3131
+ ctxMenuStore = _this30.ctxMenuStore,
3132
+ editStore = _this30.editStore,
3133
+ editOpts = _this30.editOpts,
3134
+ editConfig = _this30.editConfig,
3135
+ mouseConfig = _this30.mouseConfig,
3136
+ mouseOpts = _this30.mouseOpts,
3137
+ keyboardConfig = _this30.keyboardConfig,
3138
+ keyboardOpts = _this30.keyboardOpts,
3139
+ treeConfig = _this30.treeConfig,
3140
+ treeOpts = _this30.treeOpts,
3141
+ highlightCurrentRow = _this30.highlightCurrentRow,
3142
+ currentRow = _this30.currentRow,
3143
+ bodyCtxMenu = _this30.bodyCtxMenu,
3144
+ rowOpts = _this30.rowOpts;
3290
3145
  var selected = editStore.selected,
3291
3146
  actived = editStore.actived;
3292
3147
  var keyCode = evnt.keyCode;
@@ -3313,7 +3168,7 @@ var Methods = {
3313
3168
  var params;
3314
3169
  if (filterStore.visible) {
3315
3170
  if (isEsc) {
3316
- _this29.closeFilter();
3171
+ _this30.closeFilter();
3317
3172
  }
3318
3173
  return;
3319
3174
  }
@@ -3321,19 +3176,19 @@ var Methods = {
3321
3176
  // 如果配置了右键菜单; 支持方向键操作、回车
3322
3177
  evnt.preventDefault();
3323
3178
  if (ctxMenuStore.showChild && hasChildrenList(ctxMenuStore.selected)) {
3324
- _this29.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selectChild', 37, false, ctxMenuStore.selected.children);
3179
+ _this30.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selectChild', 37, false, ctxMenuStore.selected.children);
3325
3180
  } else {
3326
- _this29.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selected', 39, true, _this29.ctxMenuList);
3181
+ _this30.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selected', 39, true, _this30.ctxMenuList);
3327
3182
  }
3328
- } else if (keyboardConfig && mouseConfig && mouseOpts.area && _this29.handleKeyboardEvent) {
3329
- _this29.handleKeyboardEvent(evnt);
3183
+ } else if (keyboardConfig && mouseConfig && mouseOpts.area && _this30.handleKeyboardEvent) {
3184
+ _this30.handleKeyboardEvent(evnt);
3330
3185
  } else if (keyboardConfig && isSpacebar && keyboardOpts.isChecked && selected.row && selected.column && (selected.column.type === 'checkbox' || selected.column.type === 'radio')) {
3331
3186
  // 空格键支持选中复选框
3332
3187
  evnt.preventDefault();
3333
3188
  if (selected.column.type === 'checkbox') {
3334
- _this29.handleToggleCheckRowEvent(evnt, selected.args);
3189
+ _this30.handleToggleCheckRowEvent(evnt, selected.args);
3335
3190
  } else {
3336
- _this29.triggerRadioRowEvent(evnt, selected.args);
3191
+ _this30.triggerRadioRowEvent(evnt, selected.args);
3337
3192
  }
3338
3193
  } else if (isF2 && (0, _utils.isEnableConf)(editConfig)) {
3339
3194
  if (!isEditStatus) {
@@ -3341,15 +3196,15 @@ var Methods = {
3341
3196
  if (selected.row && selected.column) {
3342
3197
  evnt.stopPropagation();
3343
3198
  evnt.preventDefault();
3344
- _this29.handleActived(selected.args, evnt);
3199
+ _this30.handleActived(selected.args, evnt);
3345
3200
  }
3346
3201
  }
3347
3202
  } else if (isContextMenu) {
3348
3203
  // 如果按下上下文键
3349
- _this29._keyCtx = selected.row && selected.column && bodyCtxMenu.length;
3350
- clearTimeout(_this29.keyCtxTimeout);
3351
- _this29.keyCtxTimeout = setTimeout(function () {
3352
- _this29._keyCtx = false;
3204
+ _this30._keyCtx = selected.row && selected.column && bodyCtxMenu.length;
3205
+ clearTimeout(_this30.keyCtxTimeout);
3206
+ _this30.keyCtxTimeout = setTimeout(function () {
3207
+ _this30._keyCtx = false;
3353
3208
  }, 1000);
3354
3209
  } else if (isEnter && !hasAltKey && keyboardConfig && keyboardOpts.isEnter && (selected.row || actived.row || treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow)) {
3355
3210
  // 退出选中
@@ -3357,11 +3212,11 @@ var Methods = {
3357
3212
  // 如果是激活编辑状态,则取消编辑
3358
3213
  if (actived.row) {
3359
3214
  params = actived.args;
3360
- _this29.clearEdit(evnt);
3215
+ _this30.clearEdit(evnt);
3361
3216
  // 如果配置了选中功能,则为选中状态
3362
3217
  if (mouseConfig && mouseOpts.selected) {
3363
- _this29.$nextTick(function () {
3364
- return _this29.handleSelected(params, evnt);
3218
+ _this30.$nextTick(function () {
3219
+ return _this30.handleSelected(params, evnt);
3365
3220
  });
3366
3221
  }
3367
3222
  }
@@ -3371,15 +3226,15 @@ var Methods = {
3371
3226
  var targetArgs = selected.row ? selected.args : actived.args;
3372
3227
  if (hasShiftKey) {
3373
3228
  if (keyboardOpts.enterToTab) {
3374
- _this29.moveTabSelected(targetArgs, hasShiftKey, evnt);
3229
+ _this30.moveTabSelected(targetArgs, hasShiftKey, evnt);
3375
3230
  } else {
3376
- _this29.moveSelected(targetArgs, isLeftArrow, true, isRightArrow, false, evnt);
3231
+ _this30.moveSelected(targetArgs, isLeftArrow, true, isRightArrow, false, evnt);
3377
3232
  }
3378
3233
  } else {
3379
3234
  if (keyboardOpts.enterToTab) {
3380
- _this29.moveTabSelected(targetArgs, hasShiftKey, evnt);
3235
+ _this30.moveTabSelected(targetArgs, hasShiftKey, evnt);
3381
3236
  } else {
3382
- _this29.moveSelected(targetArgs, isLeftArrow, false, isRightArrow, true, evnt);
3237
+ _this30.moveSelected(targetArgs, isLeftArrow, false, isRightArrow, true, evnt);
3383
3238
  }
3384
3239
  }
3385
3240
  } else if (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
@@ -3389,13 +3244,13 @@ var Methods = {
3389
3244
  evnt.preventDefault();
3390
3245
  var targetRow = childrens[0];
3391
3246
  params = {
3392
- $table: _this29,
3247
+ $table: _this30,
3393
3248
  row: targetRow
3394
3249
  };
3395
- _this29.setTreeExpand(currentRow, true).then(function () {
3396
- return _this29.scrollToRow(targetRow);
3250
+ _this30.setTreeExpand(currentRow, true).then(function () {
3251
+ return _this30.scrollToRow(targetRow);
3397
3252
  }).then(function () {
3398
- return _this29.triggerCurrentRowEvent(evnt, params);
3253
+ return _this30.triggerCurrentRowEvent(evnt, params);
3399
3254
  });
3400
3255
  }
3401
3256
  }
@@ -3404,18 +3259,18 @@ var Methods = {
3404
3259
  if (!isEditStatus) {
3405
3260
  // 如果按下了方向键
3406
3261
  if (selected.row && selected.column) {
3407
- _this29.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
3262
+ _this30.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
3408
3263
  } else if ((isUpArrow || isDwArrow) && (rowOpts.isCurrent || highlightCurrentRow)) {
3409
3264
  // 当前行按键上下移动
3410
- _this29.moveCurrentRow(isUpArrow, isDwArrow, evnt);
3265
+ _this30.moveCurrentRow(isUpArrow, isDwArrow, evnt);
3411
3266
  }
3412
3267
  }
3413
3268
  } else if (isTab && keyboardConfig && keyboardOpts.isTab) {
3414
3269
  // 如果按下了 Tab 键切换
3415
3270
  if (selected.row || selected.column) {
3416
- _this29.moveTabSelected(selected.args, hasShiftKey, evnt);
3271
+ _this30.moveTabSelected(selected.args, hasShiftKey, evnt);
3417
3272
  } else if (actived.row || actived.column) {
3418
- _this29.moveTabSelected(actived.args, hasShiftKey, evnt);
3273
+ _this30.moveTabSelected(actived.args, hasShiftKey, evnt);
3419
3274
  }
3420
3275
  } else if (keyboardConfig && (treeConfig || (0, _utils.isEnableConf)(editConfig)) && (isDel || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow ? hasBackspaceKey && keyboardOpts.isArrow : hasBackspaceKey))) {
3421
3276
  if (!isEditStatus) {
@@ -3425,10 +3280,10 @@ var Methods = {
3425
3280
  if (keyboardOpts.isDel && (0, _utils.isEnableConf)(editConfig) && (selected.row || selected.column)) {
3426
3281
  var delPaqrams = {
3427
3282
  row: selected.row,
3428
- rowIndex: _this29.getRowIndex(selected.row),
3283
+ rowIndex: _this30.getRowIndex(selected.row),
3429
3284
  column: selected.column,
3430
- columnIndex: _this29.getColumnIndex(selected.column),
3431
- $table: _this29
3285
+ columnIndex: _this30.getColumnIndex(selected.column),
3286
+ $table: _this30
3432
3287
  };
3433
3288
  if (delMethod) {
3434
3289
  delMethod(delPaqrams);
@@ -3439,22 +3294,22 @@ var Methods = {
3439
3294
  if (backMethod) {
3440
3295
  backMethod({
3441
3296
  row: selected.row,
3442
- rowIndex: _this29.getRowIndex(selected.row),
3297
+ rowIndex: _this30.getRowIndex(selected.row),
3443
3298
  column: selected.column,
3444
- columnIndex: _this29.getColumnIndex(selected.column),
3445
- $table: _this29
3299
+ columnIndex: _this30.getColumnIndex(selected.column),
3300
+ $table: _this30
3446
3301
  });
3447
3302
  } else {
3448
- _this29.handleActived(selected.args, evnt);
3303
+ _this30.handleActived(selected.args, evnt);
3449
3304
  }
3450
3305
  } else if (isDel) {
3451
3306
  // 如果按下 del 键,更新表尾数据
3452
- _this29.updateFooter();
3307
+ _this30.updateFooter();
3453
3308
  }
3454
- _this29.emitEvent('cell-delete-value', delPaqrams, evnt);
3309
+ _this30.emitEvent('cell-delete-value', delPaqrams, evnt);
3455
3310
  } else if (hasBackspaceKey && keyboardOpts.isArrow && treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
3456
3311
  // 如果树形表格回退键关闭当前行返回父节点
3457
- var _XEUtils$findTree = _xeUtils.default.findTree(_this29.afterFullData, function (item) {
3312
+ var _XEUtils$findTree = _xeUtils.default.findTree(_this30.afterFullData, function (item) {
3458
3313
  return item === currentRow;
3459
3314
  }, {
3460
3315
  children: childrenField
@@ -3463,13 +3318,13 @@ var Methods = {
3463
3318
  if (parentRow) {
3464
3319
  evnt.preventDefault();
3465
3320
  params = {
3466
- $table: _this29,
3321
+ $table: _this30,
3467
3322
  row: parentRow
3468
3323
  };
3469
- _this29.setTreeExpand(parentRow, false).then(function () {
3470
- return _this29.scrollToRow(parentRow);
3324
+ _this30.setTreeExpand(parentRow, false).then(function () {
3325
+ return _this30.scrollToRow(parentRow);
3471
3326
  }).then(function () {
3472
- return _this29.triggerCurrentRowEvent(evnt, params);
3327
+ return _this30.triggerCurrentRowEvent(evnt, params);
3473
3328
  });
3474
3329
  }
3475
3330
  }
@@ -3484,39 +3339,39 @@ var Methods = {
3484
3339
  if (selected.column && selected.row && (0, _utils.isEnableConf)(selected.column.editRender)) {
3485
3340
  var beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod;
3486
3341
  if (!beforeEditMethod || beforeEditMethod(_objectSpread(_objectSpread({}, selected.args), {}, {
3487
- $table: _this29,
3488
- $grid: _this29.$xegrid
3342
+ $table: _this30,
3343
+ $grid: _this30.$xegrid
3489
3344
  }))) {
3490
3345
  if (editMethod) {
3491
3346
  editMethod({
3492
3347
  row: selected.row,
3493
- rowIndex: _this29.getRowIndex(selected.row),
3348
+ rowIndex: _this30.getRowIndex(selected.row),
3494
3349
  column: selected.column,
3495
- columnIndex: _this29.getColumnIndex(selected.column),
3496
- $table: _this29,
3497
- $grid: _this29.$xegrid
3350
+ columnIndex: _this30.getColumnIndex(selected.column),
3351
+ $table: _this30,
3352
+ $grid: _this30.$xegrid
3498
3353
  });
3499
3354
  } else {
3500
3355
  setCellValue(selected.row, selected.column, null);
3501
- _this29.handleActived(selected.args, evnt);
3356
+ _this30.handleActived(selected.args, evnt);
3502
3357
  }
3503
3358
  var afterEditMethod = editOpts.afterEditMethod;
3504
3359
  if (afterEditMethod) {
3505
- _this29.$nextTick(function () {
3360
+ _this30.$nextTick(function () {
3506
3361
  afterEditMethod({
3507
3362
  row: selected.row,
3508
- rowIndex: _this29.getRowIndex(selected.row),
3363
+ rowIndex: _this30.getRowIndex(selected.row),
3509
3364
  column: selected.column,
3510
- columnIndex: _this29.getColumnIndex(selected.column),
3511
- $table: _this29,
3512
- $grid: _this29.$xegrid
3365
+ columnIndex: _this30.getColumnIndex(selected.column),
3366
+ $table: _this30,
3367
+ $grid: _this30.$xegrid
3513
3368
  });
3514
3369
  });
3515
3370
  }
3516
3371
  }
3517
3372
  }
3518
3373
  }
3519
- _this29.emitEvent('keydown', {}, evnt);
3374
+ _this30.emitEvent('keydown', {}, evnt);
3520
3375
  });
3521
3376
  }
3522
3377
  },
@@ -3591,7 +3446,7 @@ var Methods = {
3591
3446
  }
3592
3447
  },
3593
3448
  handleTargetLeaveEvent: function handleTargetLeaveEvent() {
3594
- var _this30 = this;
3449
+ var _this31 = this;
3595
3450
  var tooltipOpts = this.tooltipOpts;
3596
3451
  var $tooltip = this.$refs.tooltip;
3597
3452
  if ($tooltip) {
@@ -3599,9 +3454,9 @@ var Methods = {
3599
3454
  }
3600
3455
  if (tooltipOpts.enterable) {
3601
3456
  this.tooltipTimeout = setTimeout(function () {
3602
- $tooltip = _this30.$refs.tooltip;
3457
+ $tooltip = _this31.$refs.tooltip;
3603
3458
  if ($tooltip && !$tooltip.isActived()) {
3604
- _this30.closeTooltip();
3459
+ _this31.closeTooltip();
3605
3460
  }
3606
3461
  }, tooltipOpts.leaveDelay);
3607
3462
  } else {
@@ -3819,12 +3674,12 @@ var Methods = {
3819
3674
  }
3820
3675
  },
3821
3676
  handleCheckedCheckboxRow: function handleCheckedCheckboxRow(rows, value, isForce) {
3822
- var _this31 = this;
3677
+ var _this32 = this;
3823
3678
  if (rows && !_xeUtils.default.isArray(rows)) {
3824
3679
  rows = [rows];
3825
3680
  }
3826
3681
  rows.forEach(function (row) {
3827
- return _this31.handleSelectRow({
3682
+ return _this32.handleSelectRow({
3828
3683
  row: row
3829
3684
  }, !!value, isForce);
3830
3685
  });
@@ -3854,9 +3709,9 @@ var Methods = {
3854
3709
  * 多选,行选中事件
3855
3710
  * value 选中true 不选false 半选-1
3856
3711
  */
3857
- handleSelectRow: function handleSelectRow(_ref6, value, isForce) {
3858
- var _this32 = this;
3859
- var row = _ref6.row;
3712
+ handleSelectRow: function handleSelectRow(_ref5, value, isForce) {
3713
+ var _this33 = this;
3714
+ var row = _ref5.row;
3860
3715
  var selectCheckboxMaps = this.selectCheckboxMaps,
3861
3716
  afterFullData = this.afterFullData,
3862
3717
  treeConfig = this.treeConfig,
@@ -3883,15 +3738,15 @@ var Methods = {
3883
3738
  } else {
3884
3739
  // 更新子节点状态
3885
3740
  _xeUtils.default.eachTree([row], function (item) {
3886
- if (_this32.eqRow(item, row) || isForce || !checkMethod || checkMethod({
3741
+ if (_this33.eqRow(item, row) || isForce || !checkMethod || checkMethod({
3887
3742
  row: item
3888
3743
  })) {
3889
3744
  _xeUtils.default.set(item, checkField, value);
3890
3745
  if (indeterminateField) {
3891
3746
  _xeUtils.default.set(row, indeterminateField, false);
3892
3747
  }
3893
- delete treeIndeterminateMaps[(0, _util.getRowid)(_this32, item)];
3894
- _this32.handleCheckboxReserveRow(row, value);
3748
+ delete treeIndeterminateMaps[(0, _util.getRowid)(_this33, item)];
3749
+ _this33.handleCheckboxReserveRow(row, value);
3895
3750
  }
3896
3751
  }, {
3897
3752
  children: childrenField
@@ -3899,7 +3754,7 @@ var Methods = {
3899
3754
  }
3900
3755
  // 如果存在父节点,更新父节点状态
3901
3756
  var matchObj = _xeUtils.default.findTree(afterFullData, function (item) {
3902
- return _this32.eqRow(item, row);
3757
+ return _this33.eqRow(item, row);
3903
3758
  }, {
3904
3759
  children: childrenField
3905
3760
  });
@@ -3912,20 +3767,20 @@ var Methods = {
3912
3767
  if (checkMethod({
3913
3768
  row: item
3914
3769
  })) {
3915
- var itemRid = (0, _util.getRowid)(_this32, item);
3770
+ var itemRid = (0, _util.getRowid)(_this33, item);
3916
3771
  vItemMaps[itemRid] = item;
3917
3772
  vItems.push(item);
3918
3773
  }
3919
3774
  });
3920
3775
  } else {
3921
3776
  matchObj.items.forEach(function (item) {
3922
- var itemRid = (0, _util.getRowid)(_this32, item);
3777
+ var itemRid = (0, _util.getRowid)(_this33, item);
3923
3778
  vItemMaps[itemRid] = item;
3924
3779
  vItems.push(item);
3925
3780
  });
3926
3781
  }
3927
3782
  var indeterminatesItem = _xeUtils.default.find(matchObj.items, function (item) {
3928
- return !!treeIndeterminateMaps[(0, _util.getRowid)(_this32, item)];
3783
+ return !!treeIndeterminateMaps[(0, _util.getRowid)(_this33, item)];
3929
3784
  });
3930
3785
  if (indeterminatesItem) {
3931
3786
  parentStatus = -1;
@@ -3937,7 +3792,7 @@ var Methods = {
3937
3792
  }
3938
3793
  });
3939
3794
  parentStatus = selectItems.filter(function (item) {
3940
- return vItemMaps[(0, _util.getRowid)(_this32, item)];
3795
+ return vItemMaps[(0, _util.getRowid)(_this33, item)];
3941
3796
  }).length === vItems.length ? true : selectItems.length || value === -1 ? -1 : false;
3942
3797
  }
3943
3798
  this.selectCheckboxMaps = selectRowMaps;
@@ -3968,8 +3823,8 @@ var Methods = {
3968
3823
  } else {
3969
3824
  // 更新子节点状态
3970
3825
  _xeUtils.default.eachTree([row], function (item) {
3971
- var itemRid = (0, _util.getRowid)(_this32, item);
3972
- if (_this32.eqRow(item, row) || isForce || !checkMethod || checkMethod({
3826
+ var itemRid = (0, _util.getRowid)(_this33, item);
3827
+ if (_this33.eqRow(item, row) || isForce || !checkMethod || checkMethod({
3973
3828
  row: item
3974
3829
  })) {
3975
3830
  if (value) {
@@ -3982,8 +3837,8 @@ var Methods = {
3982
3837
  if (indeterminateField) {
3983
3838
  _xeUtils.default.set(row, indeterminateField, false);
3984
3839
  }
3985
- delete treeIndeterminateMaps[(0, _util.getRowid)(_this32, item)];
3986
- _this32.handleCheckboxReserveRow(row, value);
3840
+ delete treeIndeterminateMaps[(0, _util.getRowid)(_this33, item)];
3841
+ _this33.handleCheckboxReserveRow(row, value);
3987
3842
  }
3988
3843
  }, {
3989
3844
  children: childrenField
@@ -3991,7 +3846,7 @@ var Methods = {
3991
3846
  }
3992
3847
  // 如果存在父节点,更新父节点状态
3993
3848
  var _matchObj = _xeUtils.default.findTree(afterFullData, function (item) {
3994
- return _this32.eqRow(item, row);
3849
+ return _this33.eqRow(item, row);
3995
3850
  }, {
3996
3851
  children: childrenField
3997
3852
  });
@@ -4004,33 +3859,33 @@ var Methods = {
4004
3859
  if (checkMethod({
4005
3860
  row: item
4006
3861
  })) {
4007
- var itemRid = (0, _util.getRowid)(_this32, item);
3862
+ var itemRid = (0, _util.getRowid)(_this33, item);
4008
3863
  _vItemMaps[itemRid] = item;
4009
3864
  _vItems.push(item);
4010
3865
  }
4011
3866
  });
4012
3867
  } else {
4013
3868
  _matchObj.items.forEach(function (item) {
4014
- var itemRid = (0, _util.getRowid)(_this32, item);
3869
+ var itemRid = (0, _util.getRowid)(_this33, item);
4015
3870
  _vItemMaps[itemRid] = item;
4016
3871
  _vItems.push(item);
4017
3872
  });
4018
3873
  }
4019
3874
  var _indeterminatesItem = _xeUtils.default.find(_matchObj.items, function (item) {
4020
- return !!treeIndeterminateMaps[(0, _util.getRowid)(_this32, item)];
3875
+ return !!treeIndeterminateMaps[(0, _util.getRowid)(_this33, item)];
4021
3876
  });
4022
3877
  if (_indeterminatesItem) {
4023
3878
  _parentStatus = -1;
4024
3879
  } else {
4025
3880
  var _selectItems = [];
4026
3881
  _matchObj.items.forEach(function (item) {
4027
- var itemRid = (0, _util.getRowid)(_this32, item);
3882
+ var itemRid = (0, _util.getRowid)(_this33, item);
4028
3883
  if (selectRowMaps[itemRid]) {
4029
3884
  _selectItems.push(item);
4030
3885
  }
4031
3886
  });
4032
3887
  _parentStatus = _selectItems.filter(function (item) {
4033
- return _vItemMaps[(0, _util.getRowid)(_this32, item)];
3888
+ return _vItemMaps[(0, _util.getRowid)(_this33, item)];
4034
3889
  }).length === _vItems.length ? true : _selectItems.length || value === -1 ? -1 : false;
4035
3890
  }
4036
3891
  this.selectCheckboxMaps = selectRowMaps;
@@ -4132,7 +3987,7 @@ var Methods = {
4132
3987
  return this.$nextTick();
4133
3988
  },
4134
3989
  handleCheckedAllCheckboxRow: function handleCheckedAllCheckboxRow(value, isForce) {
4135
- var _this33 = this;
3990
+ var _this34 = this;
4136
3991
  var afterFullData = this.afterFullData,
4137
3992
  treeConfig = this.treeConfig,
4138
3993
  treeOpts = this.treeOpts,
@@ -4171,7 +4026,7 @@ var Methods = {
4171
4026
  row: row
4172
4027
  })) {
4173
4028
  if (value) {
4174
- selectRowMaps[(0, _util.getRowid)(_this33, row)] = row;
4029
+ selectRowMaps[(0, _util.getRowid)(_this34, row)] = row;
4175
4030
  }
4176
4031
  _xeUtils.default.set(row, checkField, value);
4177
4032
  }
@@ -4203,7 +4058,7 @@ var Methods = {
4203
4058
  if (isForce || !checkMethod || checkMethod({
4204
4059
  row: row
4205
4060
  })) {
4206
- selectRowMaps[(0, _util.getRowid)(_this33, row)] = row;
4061
+ selectRowMaps[(0, _util.getRowid)(_this34, row)] = row;
4207
4062
  }
4208
4063
  }, {
4209
4064
  children: childrenField
@@ -4215,7 +4070,7 @@ var Methods = {
4215
4070
  */
4216
4071
  if (!isForce && checkMethod) {
4217
4072
  _xeUtils.default.eachTree(afterFullData, function (row) {
4218
- var rowid = (0, _util.getRowid)(_this33, row);
4073
+ var rowid = (0, _util.getRowid)(_this34, row);
4219
4074
  if (checkMethod({
4220
4075
  row: row
4221
4076
  }) ? 0 : selectCheckboxMaps[rowid]) {
@@ -4235,7 +4090,7 @@ var Methods = {
4235
4090
  */
4236
4091
  if (!isForce && checkMethod) {
4237
4092
  afterFullData.forEach(function (row) {
4238
- var rowid = (0, _util.getRowid)(_this33, row);
4093
+ var rowid = (0, _util.getRowid)(_this34, row);
4239
4094
  if (selectCheckboxMaps[rowid] || checkMethod({
4240
4095
  row: row
4241
4096
  })) {
@@ -4244,7 +4099,7 @@ var Methods = {
4244
4099
  });
4245
4100
  } else {
4246
4101
  afterFullData.forEach(function (row) {
4247
- selectRowMaps[(0, _util.getRowid)(_this33, row)] = row;
4102
+ selectRowMaps[(0, _util.getRowid)(_this34, row)] = row;
4248
4103
  });
4249
4104
  }
4250
4105
  } else {
@@ -4255,7 +4110,7 @@ var Methods = {
4255
4110
  */
4256
4111
  if (!isForce && checkMethod) {
4257
4112
  afterFullData.forEach(function (row) {
4258
- var rowid = (0, _util.getRowid)(_this33, row);
4113
+ var rowid = (0, _util.getRowid)(_this34, row);
4259
4114
  if (checkMethod({
4260
4115
  row: row
4261
4116
  }) ? 0 : selectCheckboxMaps[rowid]) {
@@ -4273,7 +4128,7 @@ var Methods = {
4273
4128
  });
4274
4129
  } else {
4275
4130
  afterFullData.forEach(function (row) {
4276
- return _this33.handleCheckboxReserveRow(row, false);
4131
+ return _this34.handleCheckboxReserveRow(row, false);
4277
4132
  });
4278
4133
  }
4279
4134
  }
@@ -4292,7 +4147,7 @@ var Methods = {
4292
4147
  return this.handleCheckedAllCheckboxRow(value, true);
4293
4148
  },
4294
4149
  checkSelectionStatus: function checkSelectionStatus() {
4295
- var _this34 = this;
4150
+ var _this35 = this;
4296
4151
  var afterFullData = this.afterFullData,
4297
4152
  selectCheckboxMaps = this.selectCheckboxMaps,
4298
4153
  treeIndeterminateMaps = this.treeIndeterminateMaps,
@@ -4328,11 +4183,11 @@ var Methods = {
4328
4183
  if (treeConfig) {
4329
4184
  if (indeterminateField) {
4330
4185
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
4331
- return _xeUtils.default.get(row, checkField) || _xeUtils.default.get(row, indeterminateField) || !!treeIndeterminateMaps[(0, _util.getRowid)(_this34, row)];
4186
+ return _xeUtils.default.get(row, checkField) || _xeUtils.default.get(row, indeterminateField) || !!treeIndeterminateMaps[(0, _util.getRowid)(_this35, row)];
4332
4187
  });
4333
4188
  } else {
4334
4189
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
4335
- return _xeUtils.default.get(row, checkField) || !!treeIndeterminateMaps[(0, _util.getRowid)(_this34, row)];
4190
+ return _xeUtils.default.get(row, checkField) || !!treeIndeterminateMaps[(0, _util.getRowid)(_this35, row)];
4336
4191
  });
4337
4192
  }
4338
4193
  } else {
@@ -4354,23 +4209,23 @@ var Methods = {
4354
4209
  disableRows.push(row);
4355
4210
  return true;
4356
4211
  }
4357
- if (selectCheckboxMaps[(0, _util.getRowid)(_this34, row)]) {
4212
+ if (selectCheckboxMaps[(0, _util.getRowid)(_this35, row)]) {
4358
4213
  checkRows.push(row);
4359
4214
  return true;
4360
4215
  }
4361
4216
  return false;
4362
4217
  } : function (row) {
4363
- return selectCheckboxMaps[(0, _util.getRowid)(_this34, row)];
4218
+ return selectCheckboxMaps[(0, _util.getRowid)(_this35, row)];
4364
4219
  });
4365
4220
  isAllSelected = isAllResolve && afterFullData.length !== disableRows.length;
4366
4221
  if (treeConfig) {
4367
4222
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
4368
- var itemRid = (0, _util.getRowid)(_this34, row);
4223
+ var itemRid = (0, _util.getRowid)(_this35, row);
4369
4224
  return treeIndeterminateMaps[itemRid] || selectCheckboxMaps[itemRid];
4370
4225
  });
4371
4226
  } else {
4372
4227
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
4373
- return selectCheckboxMaps[(0, _util.getRowid)(_this34, row)];
4228
+ return selectCheckboxMaps[(0, _util.getRowid)(_this35, row)];
4374
4229
  });
4375
4230
  }
4376
4231
  }
@@ -4479,7 +4334,7 @@ var Methods = {
4479
4334
  * 获取复选框保留选中的行
4480
4335
  */
4481
4336
  getCheckboxReserveRecords: function getCheckboxReserveRecords(isFull) {
4482
- var _this35 = this;
4337
+ var _this36 = this;
4483
4338
  var fullDataRowIdData = this.fullDataRowIdData,
4484
4339
  afterFullData = this.afterFullData,
4485
4340
  checkboxReserveRowMap = this.checkboxReserveRowMap,
@@ -4492,13 +4347,13 @@ var Methods = {
4492
4347
  var afterFullIdMaps = {};
4493
4348
  if (treeConfig) {
4494
4349
  _xeUtils.default.eachTree(afterFullData, function (row) {
4495
- afterFullIdMaps[(0, _util.getRowid)(_this35, row)] = 1;
4350
+ afterFullIdMaps[(0, _util.getRowid)(_this36, row)] = 1;
4496
4351
  }, {
4497
4352
  children: childrenField
4498
4353
  });
4499
4354
  } else {
4500
4355
  afterFullData.forEach(function (row) {
4501
- afterFullIdMaps[(0, _util.getRowid)(_this35, row)] = 1;
4356
+ afterFullIdMaps[(0, _util.getRowid)(_this36, row)] = 1;
4502
4357
  });
4503
4358
  }
4504
4359
  _xeUtils.default.each(checkboxReserveRowMap, function (oldRow, oldRowid) {
@@ -4570,7 +4425,7 @@ var Methods = {
4570
4425
  * 清空行为不管是否被禁用还是保留记录,都将彻底清空选中状态
4571
4426
  */
4572
4427
  clearCheckboxRow: function clearCheckboxRow() {
4573
- var _this36 = this;
4428
+ var _this37 = this;
4574
4429
  var tableFullData = this.tableFullData,
4575
4430
  treeConfig = this.treeConfig,
4576
4431
  treeOpts = this.treeOpts,
@@ -4596,7 +4451,7 @@ var Methods = {
4596
4451
  }
4597
4452
  if (reserve) {
4598
4453
  tableFullData.forEach(function (row) {
4599
- return _this36.handleCheckboxReserveRow(row, false);
4454
+ return _this37.handleCheckboxReserveRow(row, false);
4600
4455
  });
4601
4456
  }
4602
4457
  this.isAllSelected = false;
@@ -4756,8 +4611,8 @@ var Methods = {
4756
4611
  /**
4757
4612
  * 行 hover 事件
4758
4613
  */
4759
- triggerHoverEvent: function triggerHoverEvent(evnt, _ref7) {
4760
- var row = _ref7.row;
4614
+ triggerHoverEvent: function triggerHoverEvent(evnt, _ref6) {
4615
+ var row = _ref6.row;
4761
4616
  this.setHoverRow(row);
4762
4617
  },
4763
4618
  setHoverRow: function setHoverRow(row) {
@@ -4841,12 +4696,12 @@ var Methods = {
4841
4696
  * 如果存在规则,则校验
4842
4697
  */
4843
4698
  handleChangeCell: function handleChangeCell(evnt, params) {
4844
- var _this37 = this;
4699
+ var _this38 = this;
4845
4700
  this.checkValidate('blur').catch(function (e) {
4846
4701
  return e;
4847
4702
  }).then(function () {
4848
- _this37.handleActived(params, evnt).then(function () {
4849
- return _this37.checkValidate('change');
4703
+ _this38.handleActived(params, evnt).then(function () {
4704
+ return _this38.checkValidate('change');
4850
4705
  }).catch(function (e) {
4851
4706
  return e;
4852
4707
  });
@@ -4947,7 +4802,7 @@ var Methods = {
4947
4802
  * 如果是双击模式,则激活为编辑状态
4948
4803
  */
4949
4804
  triggerCellDblclickEvent: function triggerCellDblclickEvent(evnt, params) {
4950
- var _this38 = this;
4805
+ var _this39 = this;
4951
4806
  var editStore = this.editStore,
4952
4807
  editConfig = this.editConfig,
4953
4808
  editOpts = this.editOpts;
@@ -4960,15 +4815,15 @@ var Methods = {
4960
4815
  this.checkValidate('blur').catch(function (e) {
4961
4816
  return e;
4962
4817
  }).then(function () {
4963
- _this38.handleActived(params, evnt).then(function () {
4964
- return _this38.checkValidate('change');
4818
+ _this39.handleActived(params, evnt).then(function () {
4819
+ return _this39.checkValidate('change');
4965
4820
  }).catch(function (e) {
4966
4821
  return e;
4967
4822
  });
4968
4823
  });
4969
4824
  } else if (editOpts.mode === 'cell') {
4970
4825
  this.handleActived(params, evnt).then(function () {
4971
- return _this38.checkValidate('change');
4826
+ return _this39.checkValidate('change');
4972
4827
  }).catch(function (e) {
4973
4828
  return e;
4974
4829
  });
@@ -4978,7 +4833,7 @@ var Methods = {
4978
4833
  this.emitEvent('cell-dblclick', params, evnt);
4979
4834
  },
4980
4835
  handleDefaultSort: function handleDefaultSort() {
4981
- var _this39 = this;
4836
+ var _this40 = this;
4982
4837
  var sortConfig = this.sortConfig,
4983
4838
  sortOpts = this.sortOpts;
4984
4839
  var defaultSort = sortOpts.defaultSort;
@@ -4991,7 +4846,7 @@ var Methods = {
4991
4846
  var field = item.field,
4992
4847
  order = item.order;
4993
4848
  if (field && order) {
4994
- var column = _this39.getColumnByField(field);
4849
+ var column = _this40.getColumnByField(field);
4995
4850
  if (column && column.sortable) {
4996
4851
  column.order = order;
4997
4852
  column.sortTime = Date.now() + index;
@@ -5038,7 +4893,7 @@ var Methods = {
5038
4893
  }
5039
4894
  },
5040
4895
  setPendingRow: function setPendingRow(rows, status) {
5041
- var _this40 = this;
4896
+ var _this41 = this;
5042
4897
  var pendingMaps = _objectSpread({}, this.pendingRowMaps);
5043
4898
  var pendingList = _toConsumableArray(this.pendingRowList);
5044
4899
  if (rows && !_xeUtils.default.isArray(rows)) {
@@ -5046,7 +4901,7 @@ var Methods = {
5046
4901
  }
5047
4902
  if (status) {
5048
4903
  rows.forEach(function (row) {
5049
- var rowid = (0, _util.getRowid)(_this40, row);
4904
+ var rowid = (0, _util.getRowid)(_this41, row);
5050
4905
  if (rowid && !pendingMaps[rowid]) {
5051
4906
  pendingList.push(row);
5052
4907
  pendingMaps[rowid] = row;
@@ -5054,9 +4909,9 @@ var Methods = {
5054
4909
  });
5055
4910
  } else {
5056
4911
  rows.forEach(function (row) {
5057
- var rowid = (0, _util.getRowid)(_this40, row);
4912
+ var rowid = (0, _util.getRowid)(_this41, row);
5058
4913
  if (rowid && pendingMaps[rowid]) {
5059
- var pendingIndex = _this40.findRowIndexOf(pendingList, row);
4914
+ var pendingIndex = _this41.findRowIndexOf(pendingList, row);
5060
4915
  if (pendingIndex > -1) {
5061
4916
  pendingList.splice(pendingIndex, 1);
5062
4917
  }
@@ -5069,17 +4924,17 @@ var Methods = {
5069
4924
  return this.$nextTick();
5070
4925
  },
5071
4926
  togglePendingRow: function togglePendingRow(rows) {
5072
- var _this41 = this;
4927
+ var _this42 = this;
5073
4928
  var pendingMaps = _objectSpread({}, this.pendingRowMaps);
5074
4929
  var pendingList = _toConsumableArray(this.pendingRowList);
5075
4930
  if (rows && !_xeUtils.default.isArray(rows)) {
5076
4931
  rows = [rows];
5077
4932
  }
5078
4933
  rows.forEach(function (row) {
5079
- var rowid = (0, _util.getRowid)(_this41, row);
4934
+ var rowid = (0, _util.getRowid)(_this42, row);
5080
4935
  if (rowid) {
5081
4936
  if (pendingMaps[rowid]) {
5082
- var pendingIndex = _this41.findRowIndexOf(pendingList, row);
4937
+ var pendingIndex = _this42.findRowIndexOf(pendingList, row);
5083
4938
  if (pendingIndex > -1) {
5084
4939
  pendingList.splice(pendingIndex, 1);
5085
4940
  }
@@ -5108,7 +4963,7 @@ var Methods = {
5108
4963
  return this.$nextTick();
5109
4964
  },
5110
4965
  sort: function sort(sortConfs, sortOrder) {
5111
- var _this42 = this;
4966
+ var _this43 = this;
5112
4967
  var sortOpts = this.sortOpts;
5113
4968
  var multiple = sortOpts.multiple,
5114
4969
  remote = sortOpts.remote,
@@ -5134,14 +4989,14 @@ var Methods = {
5134
4989
  order = confs.order;
5135
4990
  var column = field;
5136
4991
  if (_xeUtils.default.isString(field)) {
5137
- column = _this42.getColumnByField(field);
4992
+ column = _this43.getColumnByField(field);
5138
4993
  }
5139
4994
  if (column && (column.sortable || column.remoteSort)) {
5140
4995
  if (!firstSortColumn) {
5141
4996
  firstSortColumn = column;
5142
4997
  }
5143
4998
  if (orders.indexOf(order) === -1) {
5144
- order = getNextSortOrder(_this42, column);
4999
+ order = getNextSortOrder(_this43, column);
5145
5000
  }
5146
5001
  if (column.order !== order) {
5147
5002
  column.order = order;
@@ -5154,8 +5009,8 @@ var Methods = {
5154
5009
  this.handleTableData(true);
5155
5010
  }
5156
5011
  return this.$nextTick().then(function () {
5157
- _this42.updateCellAreas();
5158
- return _this42.updateStyle();
5012
+ _this43.updateCellAreas();
5013
+ return _this43.updateStyle();
5159
5014
  });
5160
5015
  }
5161
5016
  return this.$nextTick();
@@ -5291,14 +5146,14 @@ var Methods = {
5291
5146
  * @param {Row} row 行对象
5292
5147
  */
5293
5148
  reloadRowExpand: function reloadRowExpand(row) {
5294
- var _this43 = this;
5149
+ var _this44 = this;
5295
5150
  var expandOpts = this.expandOpts,
5296
5151
  rowExpandLazyLoadedMaps = this.rowExpandLazyLoadedMaps;
5297
5152
  var lazy = expandOpts.lazy;
5298
5153
  var rowid = (0, _util.getRowid)(this, row);
5299
5154
  if (lazy && !rowExpandLazyLoadedMaps[rowid]) {
5300
5155
  this.clearRowExpandLoaded(row).then(function () {
5301
- return _this43.handleAsyncRowExpand(row);
5156
+ return _this44.handleAsyncRowExpand(row);
5302
5157
  });
5303
5158
  }
5304
5159
  return this.$nextTick();
@@ -5390,39 +5245,39 @@ var Methods = {
5390
5245
  return this.setRowExpand(expandedRows, expanded);
5391
5246
  },
5392
5247
  handleAsyncRowExpand: function handleAsyncRowExpand(row) {
5393
- var _this44 = this;
5248
+ var _this45 = this;
5394
5249
  var fullAllDataRowMap = this.fullAllDataRowMap,
5395
5250
  expandOpts = this.expandOpts;
5396
5251
  var rest = fullAllDataRowMap.get(row);
5397
5252
  return new Promise(function (resolve) {
5398
5253
  var loadMethod = expandOpts.loadMethod;
5399
5254
  if (loadMethod) {
5400
- var rowExpandLazyLoadedMaps = _this44.rowExpandLazyLoadedMaps;
5255
+ var rowExpandLazyLoadedMaps = _this45.rowExpandLazyLoadedMaps;
5401
5256
  var rowTempExpandLazyLoadedMaps = _objectSpread({}, rowExpandLazyLoadedMaps);
5402
- var rowid = (0, _util.getRowid)(_this44, row);
5257
+ var rowid = (0, _util.getRowid)(_this45, row);
5403
5258
  rowTempExpandLazyLoadedMaps[rowid] = row;
5404
- _this44.rowExpandLazyLoadedMaps = rowTempExpandLazyLoadedMaps;
5259
+ _this45.rowExpandLazyLoadedMaps = rowTempExpandLazyLoadedMaps;
5405
5260
  loadMethod({
5406
- $table: _this44,
5261
+ $table: _this45,
5407
5262
  row: row,
5408
- rowIndex: _this44.getRowIndex(row),
5409
- $rowIndex: _this44.getVMRowIndex(row)
5263
+ rowIndex: _this45.getRowIndex(row),
5264
+ $rowIndex: _this45.getVMRowIndex(row)
5410
5265
  }).then(function () {
5411
5266
  rest.expandLoaded = true;
5412
- var rowExpandedMaps = _this44.rowExpandedMaps;
5267
+ var rowExpandedMaps = _this45.rowExpandedMaps;
5413
5268
  var rowTempExpandedMaps = _objectSpread({}, rowExpandedMaps);
5414
5269
  rowTempExpandedMaps[rowid] = row;
5415
- _this44.rowExpandedMaps = rowTempExpandedMaps;
5270
+ _this45.rowExpandedMaps = rowTempExpandedMaps;
5416
5271
  }).catch(function () {
5417
5272
  rest.expandLoaded = false;
5418
5273
  }).finally(function () {
5419
- var rowExpandLazyLoadedMaps = _this44.rowExpandLazyLoadedMaps;
5274
+ var rowExpandLazyLoadedMaps = _this45.rowExpandLazyLoadedMaps;
5420
5275
  var rowTempExpandLazyLoadedMaps = _objectSpread({}, rowExpandLazyLoadedMaps);
5421
5276
  if (rowTempExpandLazyLoadedMaps[rowid]) {
5422
5277
  delete rowTempExpandLazyLoadedMaps[rowid];
5423
5278
  }
5424
- _this44.rowExpandLazyLoadedMaps = rowTempExpandLazyLoadedMaps;
5425
- resolve(_this44.$nextTick().then(_this44.recalculate));
5279
+ _this45.rowExpandLazyLoadedMaps = rowTempExpandLazyLoadedMaps;
5280
+ resolve(_this45.$nextTick().then(_this45.recalculate));
5426
5281
  });
5427
5282
  } else {
5428
5283
  resolve();
@@ -5437,7 +5292,7 @@ var Methods = {
5437
5292
  * @param {Boolean} expanded 是否展开
5438
5293
  */
5439
5294
  setRowExpand: function setRowExpand(rows, expanded) {
5440
- var _this45 = this;
5295
+ var _this46 = this;
5441
5296
  var rowExpandedMaps = this.rowExpandedMaps,
5442
5297
  fullAllDataRowIdData = this.fullAllDataRowIdData,
5443
5298
  rowExpandLazyLoadedMaps = this.rowExpandLazyLoadedMaps,
@@ -5467,18 +5322,18 @@ var Methods = {
5467
5322
  columnIndex: columnIndex,
5468
5323
  $columnIndex: $columnIndex,
5469
5324
  row: row,
5470
- rowIndex: _this45.getRowIndex(row),
5471
- $rowIndex: _this45.getVMRowIndex(row)
5325
+ rowIndex: _this46.getRowIndex(row),
5326
+ $rowIndex: _this46.getVMRowIndex(row)
5472
5327
  });
5473
5328
  }) : rows;
5474
5329
  if (expanded) {
5475
5330
  validRows.forEach(function (row) {
5476
- var rowid = (0, _util.getRowid)(_this45, row);
5331
+ var rowid = (0, _util.getRowid)(_this46, row);
5477
5332
  if (!rExpandedMaps[rowid]) {
5478
5333
  var rest = fullAllDataRowIdData[rowid];
5479
5334
  var isLoad = lazy && !rest.expandLoaded && !rowExpandLazyLoadedMaps[rowid];
5480
5335
  if (isLoad) {
5481
- lazyRests.push(_this45.handleAsyncRowExpand(row));
5336
+ lazyRests.push(_this46.handleAsyncRowExpand(row));
5482
5337
  } else {
5483
5338
  rExpandedMaps[rowid] = row;
5484
5339
  }
@@ -5486,7 +5341,7 @@ var Methods = {
5486
5341
  });
5487
5342
  } else {
5488
5343
  validRows.forEach(function (item) {
5489
- var rowid = (0, _util.getRowid)(_this45, item);
5344
+ var rowid = (0, _util.getRowid)(_this46, item);
5490
5345
  if (rExpandedMaps[rowid]) {
5491
5346
  delete rExpandedMaps[rowid];
5492
5347
  }
@@ -5494,7 +5349,7 @@ var Methods = {
5494
5349
  }
5495
5350
  if (reserve) {
5496
5351
  validRows.forEach(function (row) {
5497
- return _this45.handleRowExpandReserve(row, expanded);
5352
+ return _this46.handleRowExpandReserve(row, expanded);
5498
5353
  });
5499
5354
  }
5500
5355
  }
@@ -5521,7 +5376,7 @@ var Methods = {
5521
5376
  * 手动清空展开行状态,数据会恢复成未展开的状态
5522
5377
  */
5523
5378
  clearRowExpand: function clearRowExpand() {
5524
- var _this46 = this;
5379
+ var _this47 = this;
5525
5380
  var expandOpts = this.expandOpts,
5526
5381
  tableFullData = this.tableFullData;
5527
5382
  var reserve = expandOpts.reserve;
@@ -5529,12 +5384,12 @@ var Methods = {
5529
5384
  this.rowExpandedMaps = {};
5530
5385
  if (reserve) {
5531
5386
  tableFullData.forEach(function (row) {
5532
- return _this46.handleRowExpandReserve(row, false);
5387
+ return _this47.handleRowExpandReserve(row, false);
5533
5388
  });
5534
5389
  }
5535
5390
  return this.$nextTick().then(function () {
5536
5391
  if (expList.length) {
5537
- _this46.recalculate();
5392
+ _this47.recalculate();
5538
5393
  }
5539
5394
  });
5540
5395
  },
@@ -5617,7 +5472,7 @@ var Methods = {
5617
5472
  * @param {Row} row 行对象
5618
5473
  */
5619
5474
  reloadTreeExpand: function reloadTreeExpand(row) {
5620
- var _this47 = this;
5475
+ var _this48 = this;
5621
5476
  var treeOpts = this.treeOpts,
5622
5477
  treeExpandLazyLoadedMaps = this.treeExpandLazyLoadedMaps;
5623
5478
  var transform = treeOpts.transform,
@@ -5626,14 +5481,14 @@ var Methods = {
5626
5481
  var rowid = (0, _util.getRowid)(this, row);
5627
5482
  if (lazy && row[hasChildField] && !treeExpandLazyLoadedMaps[rowid]) {
5628
5483
  this.clearTreeExpandLoaded(row).then(function () {
5629
- return _this47.handleAsyncTreeExpandChilds(row);
5484
+ return _this48.handleAsyncTreeExpandChilds(row);
5630
5485
  }).then(function () {
5631
5486
  if (transform) {
5632
- _this47.handleVirtualTreeToList();
5633
- return _this47.handleTableData();
5487
+ _this48.handleVirtualTreeToList();
5488
+ return _this48.handleTableData();
5634
5489
  }
5635
5490
  }).then(function () {
5636
- return _this47.recalculate();
5491
+ return _this48.recalculate();
5637
5492
  });
5638
5493
  }
5639
5494
  return this.$nextTick();
@@ -5711,7 +5566,7 @@ var Methods = {
5711
5566
  }
5712
5567
  },
5713
5568
  handleAsyncTreeExpandChilds: function handleAsyncTreeExpandChilds(row) {
5714
- var _this48 = this;
5569
+ var _this49 = this;
5715
5570
  var treeOpts = this.treeOpts,
5716
5571
  checkboxOpts = this.checkboxOpts;
5717
5572
  var transform = treeOpts.transform,
@@ -5719,13 +5574,13 @@ var Methods = {
5719
5574
  var checkStrictly = checkboxOpts.checkStrictly;
5720
5575
  return new Promise(function (resolve) {
5721
5576
  if (loadMethod) {
5722
- var fullAllDataRowMap = _this48.fullAllDataRowMap,
5723
- treeExpandLazyLoadedMaps = _this48.treeExpandLazyLoadedMaps;
5724
- var rowid = (0, _util.getRowid)(_this48, row);
5577
+ var fullAllDataRowMap = _this49.fullAllDataRowMap,
5578
+ treeExpandLazyLoadedMaps = _this49.treeExpandLazyLoadedMaps;
5579
+ var rowid = (0, _util.getRowid)(_this49, row);
5725
5580
  var rest = fullAllDataRowMap.get(row);
5726
5581
  treeExpandLazyLoadedMaps[rowid] = row;
5727
5582
  loadMethod({
5728
- $table: _this48,
5583
+ $table: _this49,
5729
5584
  row: row
5730
5585
  }).then(function (childRecords) {
5731
5586
  // 响应成功后则展开行,并将子节点挂载到该节点下
@@ -5737,20 +5592,20 @@ var Methods = {
5737
5592
  childRecords = [];
5738
5593
  }
5739
5594
  if (childRecords) {
5740
- return _this48.loadTreeChildren(row, childRecords).then(function (childRows) {
5741
- var treeExpandedMaps = _this48.treeExpandedMaps;
5595
+ return _this49.loadTreeChildren(row, childRecords).then(function (childRows) {
5596
+ var treeExpandedMaps = _this49.treeExpandedMaps;
5742
5597
  var treeTempExpandedMaps = _objectSpread({}, treeExpandedMaps);
5743
5598
  if (childRows.length && !treeTempExpandedMaps[rowid]) {
5744
5599
  treeTempExpandedMaps[rowid] = row;
5745
- _this48.treeExpandedMaps = treeTempExpandedMaps;
5600
+ _this49.treeExpandedMaps = treeTempExpandedMaps;
5746
5601
  }
5747
5602
  // 如果当前节点已选中,则展开后子节点也被选中
5748
- if (!checkStrictly && _this48.isCheckedByCheckboxRow(row)) {
5749
- _this48.handleCheckedCheckboxRow(childRows, true, true);
5603
+ if (!checkStrictly && _this49.isCheckedByCheckboxRow(row)) {
5604
+ _this49.handleCheckedCheckboxRow(childRows, true, true);
5750
5605
  }
5751
- return _this48.$nextTick().then(function () {
5606
+ return _this49.$nextTick().then(function () {
5752
5607
  if (transform) {
5753
- return _this48.handleTableData();
5608
+ return _this49.handleTableData();
5754
5609
  }
5755
5610
  });
5756
5611
  });
@@ -5758,13 +5613,13 @@ var Methods = {
5758
5613
  }).catch(function () {
5759
5614
  // 如果响应异常,则不展开,再次点击后将重新触发懒加载
5760
5615
  rest.treeLoaded = false;
5761
- var treeExpandLazyLoadedMaps = _this48.treeExpandLazyLoadedMaps;
5616
+ var treeExpandLazyLoadedMaps = _this49.treeExpandLazyLoadedMaps;
5762
5617
  if (treeExpandLazyLoadedMaps[rowid]) {
5763
5618
  treeExpandLazyLoadedMaps[rowid] = null;
5764
5619
  }
5765
5620
  }).finally(function () {
5766
- _this48.$nextTick().then(function () {
5767
- return _this48.recalculate();
5621
+ _this49.$nextTick().then(function () {
5622
+ return _this49.recalculate();
5768
5623
  }).then(function () {
5769
5624
  return resolve();
5770
5625
  });
@@ -5801,7 +5656,7 @@ var Methods = {
5801
5656
  * @returns
5802
5657
  */
5803
5658
  handleBaseTreeExpand: function handleBaseTreeExpand(rows, expanded) {
5804
- var _this49 = this;
5659
+ var _this50 = this;
5805
5660
  var fullAllDataRowMap = this.fullAllDataRowMap,
5806
5661
  tableFullData = this.tableFullData,
5807
5662
  treeExpandedMaps = this.treeExpandedMaps,
@@ -5837,7 +5692,7 @@ var Methods = {
5837
5692
  });
5838
5693
  if (matchObj) {
5839
5694
  matchObj.items.forEach(function (item) {
5840
- var rowid = (0, _util.getRowid)(_this49, item);
5695
+ var rowid = (0, _util.getRowid)(_this50, item);
5841
5696
  if (treeTempExpandedMaps[rowid]) {
5842
5697
  delete treeTempExpandedMaps[rowid];
5843
5698
  }
@@ -5846,13 +5701,13 @@ var Methods = {
5846
5701
  }
5847
5702
  if (expanded) {
5848
5703
  validRows.forEach(function (row) {
5849
- var rowid = (0, _util.getRowid)(_this49, row);
5704
+ var rowid = (0, _util.getRowid)(_this50, row);
5850
5705
  if (!treeTempExpandedMaps[rowid]) {
5851
5706
  var rest = fullAllDataRowMap.get(row);
5852
5707
  var isLoad = lazy && row[hasChildField] && !rest.treeLoaded && !treeExpandLazyLoadedMaps[rowid];
5853
5708
  // 是否使用懒加载
5854
5709
  if (isLoad) {
5855
- result.push(_this49.handleAsyncTreeExpandChilds(row));
5710
+ result.push(_this50.handleAsyncTreeExpandChilds(row));
5856
5711
  } else {
5857
5712
  if (row[childrenField] && row[childrenField].length) {
5858
5713
  treeTempExpandedMaps[rowid] = row;
@@ -5862,7 +5717,7 @@ var Methods = {
5862
5717
  });
5863
5718
  } else {
5864
5719
  validRows.forEach(function (item) {
5865
- var rowid = (0, _util.getRowid)(_this49, item);
5720
+ var rowid = (0, _util.getRowid)(_this50, item);
5866
5721
  if (treeTempExpandedMaps[rowid]) {
5867
5722
  delete treeTempExpandedMaps[rowid];
5868
5723
  }
@@ -5870,7 +5725,7 @@ var Methods = {
5870
5725
  }
5871
5726
  if (reserve) {
5872
5727
  validRows.forEach(function (row) {
5873
- return _this49.handleTreeExpandReserve(row, expanded);
5728
+ return _this50.handleTreeExpandReserve(row, expanded);
5874
5729
  });
5875
5730
  }
5876
5731
  this.treeExpandedMaps = treeTempExpandedMaps;
@@ -5883,12 +5738,12 @@ var Methods = {
5883
5738
  * @returns
5884
5739
  */
5885
5740
  handleVirtualTreeExpand: function handleVirtualTreeExpand(rows, expanded) {
5886
- var _this50 = this;
5741
+ var _this51 = this;
5887
5742
  return this.handleBaseTreeExpand(rows, expanded).then(function () {
5888
- _this50.handleVirtualTreeToList();
5889
- return _this50.handleTableData();
5743
+ _this51.handleVirtualTreeToList();
5744
+ return _this51.handleTableData();
5890
5745
  }).then(function () {
5891
- return _this50.recalculate();
5746
+ return _this51.recalculate();
5892
5747
  });
5893
5748
  },
5894
5749
  /**
@@ -5928,7 +5783,7 @@ var Methods = {
5928
5783
  * 手动清空树形节点的展开状态,数据会恢复成未展开的状态
5929
5784
  */
5930
5785
  clearTreeExpand: function clearTreeExpand() {
5931
- var _this51 = this;
5786
+ var _this52 = this;
5932
5787
  var treeOpts = this.treeOpts,
5933
5788
  tableFullData = this.tableFullData;
5934
5789
  var transform = treeOpts.transform,
@@ -5938,19 +5793,19 @@ var Methods = {
5938
5793
  this.treeExpandedMaps = {};
5939
5794
  if (reserve) {
5940
5795
  _xeUtils.default.eachTree(tableFullData, function (row) {
5941
- return _this51.handleTreeExpandReserve(row, false);
5796
+ return _this52.handleTreeExpandReserve(row, false);
5942
5797
  }, {
5943
5798
  children: childrenField
5944
5799
  });
5945
5800
  }
5946
5801
  return this.handleTableData().then(function () {
5947
5802
  if (transform) {
5948
- _this51.handleVirtualTreeToList();
5949
- return _this51.handleTableData();
5803
+ _this52.handleVirtualTreeToList();
5804
+ return _this52.handleTableData();
5950
5805
  }
5951
5806
  }).then(function () {
5952
5807
  if (expList.length) {
5953
- _this51.recalculate();
5808
+ _this52.recalculate();
5954
5809
  }
5955
5810
  });
5956
5811
  },
@@ -6069,28 +5924,28 @@ var Methods = {
6069
5924
  },
6070
5925
  // 计算可视渲染相关数据
6071
5926
  computeScrollLoad: function computeScrollLoad() {
6072
- var _this52 = this;
5927
+ var _this53 = this;
6073
5928
  return this.$nextTick().then(function () {
6074
- var sYOpts = _this52.sYOpts,
6075
- sXOpts = _this52.sXOpts,
6076
- scrollXLoad = _this52.scrollXLoad,
6077
- scrollYLoad = _this52.scrollYLoad,
6078
- scrollXStore = _this52.scrollXStore,
6079
- scrollYStore = _this52.scrollYStore;
5929
+ var sYOpts = _this53.sYOpts,
5930
+ sXOpts = _this53.sXOpts,
5931
+ scrollXLoad = _this53.scrollXLoad,
5932
+ scrollYLoad = _this53.scrollYLoad,
5933
+ scrollXStore = _this53.scrollXStore,
5934
+ scrollYStore = _this53.scrollYStore;
6080
5935
  // 计算 X 逻辑
6081
5936
  if (scrollXLoad) {
6082
- var _computeVirtualX3 = computeVirtualX(_this52),
5937
+ var _computeVirtualX3 = computeVirtualX(_this53),
6083
5938
  visibleXSize = _computeVirtualX3.visibleSize;
6084
5939
  var offsetXSize = sXOpts.oSize ? _xeUtils.default.toNumber(sXOpts.oSize) : _dom.browse.msie ? 10 : _dom.browse.edge ? 5 : 0;
6085
5940
  scrollXStore.offsetSize = offsetXSize;
6086
5941
  scrollXStore.visibleSize = visibleXSize;
6087
5942
  scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
6088
- _this52.updateScrollXData();
5943
+ _this53.updateScrollXData();
6089
5944
  } else {
6090
- _this52.updateScrollXSpace();
5945
+ _this53.updateScrollXSpace();
6091
5946
  }
6092
5947
  // 计算 Y 逻辑
6093
- var _computeVirtualY = computeVirtualY(_this52),
5948
+ var _computeVirtualY = computeVirtualY(_this53),
6094
5949
  rowHeight = _computeVirtualY.rowHeight,
6095
5950
  visibleYSize = _computeVirtualY.visibleSize;
6096
5951
  scrollYStore.rowHeight = rowHeight;
@@ -6099,12 +5954,12 @@ var Methods = {
6099
5954
  scrollYStore.offsetSize = offsetYSize;
6100
5955
  scrollYStore.visibleSize = visibleYSize;
6101
5956
  scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
6102
- _this52.updateScrollYData();
5957
+ _this53.updateScrollYData();
6103
5958
  } else {
6104
- _this52.updateScrollYSpace();
5959
+ _this53.updateScrollYSpace();
6105
5960
  }
6106
- _this52.rowHeight = rowHeight;
6107
- _this52.$nextTick(_this52.updateStyle);
5961
+ _this53.rowHeight = rowHeight;
5962
+ _this53.$nextTick(_this53.updateStyle);
6108
5963
  });
6109
5964
  },
6110
5965
  handleTableColumn: function handleTableColumn() {
@@ -6114,11 +5969,11 @@ var Methods = {
6114
5969
  this.tableColumn = scrollXLoad ? visibleColumn.slice(scrollXStore.startIndex, scrollXStore.endIndex) : visibleColumn.slice(0);
6115
5970
  },
6116
5971
  updateScrollXData: function updateScrollXData() {
6117
- var _this53 = this;
5972
+ var _this54 = this;
6118
5973
  // this.tableColumn = []
6119
5974
  this.$nextTick(function () {
6120
- _this53.handleTableColumn();
6121
- _this53.updateScrollXSpace();
5975
+ _this54.handleTableColumn();
5976
+ _this54.updateScrollXSpace();
6122
5977
  });
6123
5978
  },
6124
5979
  // 更新横向 X 可视渲染上下剩余空间大小
@@ -6169,11 +6024,11 @@ var Methods = {
6169
6024
  }
6170
6025
  },
6171
6026
  updateScrollYData: function updateScrollYData() {
6172
- var _this54 = this;
6027
+ var _this55 = this;
6173
6028
  // this.tableData = []
6174
6029
  this.$nextTick(function () {
6175
- _this54.handleTableData();
6176
- _this54.updateScrollYSpace();
6030
+ _this55.handleTableData();
6031
+ _this55.updateScrollYSpace();
6177
6032
  });
6178
6033
  },
6179
6034
  // 更新纵向 Y 可视渲染上下剩余空间大小
@@ -6214,7 +6069,7 @@ var Methods = {
6214
6069
  * @param {Number} scrollTop 上距离
6215
6070
  */
6216
6071
  scrollTo: function scrollTo(scrollLeft, scrollTop) {
6217
- var _this55 = this;
6072
+ var _this56 = this;
6218
6073
  var $refs = this.$refs;
6219
6074
  var tableBody = $refs.tableBody,
6220
6075
  rightBody = $refs.rightBody,
@@ -6231,7 +6086,7 @@ var Methods = {
6231
6086
  if (this.scrollXLoad || this.scrollYLoad) {
6232
6087
  return new Promise(function (resolve) {
6233
6088
  return setTimeout(function () {
6234
- return resolve(_this55.$nextTick());
6089
+ return resolve(_this56.$nextTick());
6235
6090
  }, 50);
6236
6091
  });
6237
6092
  }
@@ -6273,7 +6128,7 @@ var Methods = {
6273
6128
  * @param {Row} row 行对象
6274
6129
  */
6275
6130
  scrollToTreeRow: function scrollToTreeRow(row) {
6276
- var _this56 = this;
6131
+ var _this57 = this;
6277
6132
  var tableFullData = this.tableFullData,
6278
6133
  treeConfig = this.treeConfig,
6279
6134
  treeOpts = this.treeOpts;
@@ -6288,14 +6143,14 @@ var Methods = {
6288
6143
  if (matchObj) {
6289
6144
  var nodes = matchObj.nodes;
6290
6145
  nodes.forEach(function (row, index) {
6291
- if (index < nodes.length - 1 && !_this56.isTreeExpandByRow(row)) {
6292
- rests.push(_this56.setTreeExpand(row, true));
6146
+ if (index < nodes.length - 1 && !_this57.isTreeExpandByRow(row)) {
6147
+ rests.push(_this57.setTreeExpand(row, true));
6293
6148
  }
6294
6149
  });
6295
6150
  }
6296
6151
  }
6297
6152
  return Promise.all(rests).then(function () {
6298
- return (0, _util.rowToVisible)(_this56, row);
6153
+ return (0, _util.rowToVisible)(_this57, row);
6299
6154
  });
6300
6155
  },
6301
6156
  /**
@@ -6355,32 +6210,32 @@ var Methods = {
6355
6210
  * 如果单元格配置了校验规则,则会进行校验
6356
6211
  */
6357
6212
  updateStatus: function updateStatus(slotParams, cellValue) {
6358
- var _this57 = this;
6213
+ var _this58 = this;
6359
6214
  var customVal = !_xeUtils.default.isUndefined(cellValue);
6360
6215
  return this.$nextTick().then(function () {
6361
- var $refs = _this57.$refs,
6362
- editRules = _this57.editRules,
6363
- validStore = _this57.validStore;
6216
+ var $refs = _this58.$refs,
6217
+ editRules = _this58.editRules,
6218
+ validStore = _this58.validStore;
6364
6219
  var tableBody = $refs.tableBody;
6365
6220
  if (slotParams && tableBody && editRules) {
6366
6221
  var row = slotParams.row,
6367
6222
  column = slotParams.column;
6368
6223
  var type = 'change';
6369
- if (_this57.hasCellRules) {
6370
- if (_this57.hasCellRules(type, row, column)) {
6371
- var cell = _this57.getCellElement(row, column);
6224
+ if (_this58.hasCellRules) {
6225
+ if (_this58.hasCellRules(type, row, column)) {
6226
+ var cell = _this58.getCellElement(row, column);
6372
6227
  if (cell) {
6373
- return _this57.validCellRules(type, row, column, cellValue).then(function () {
6228
+ return _this58.validCellRules(type, row, column, cellValue).then(function () {
6374
6229
  if (customVal && validStore.visible) {
6375
6230
  setCellValue(row, column, cellValue);
6376
6231
  }
6377
- _this57.clearValidate(row, column);
6378
- }).catch(function (_ref8) {
6379
- var rule = _ref8.rule;
6232
+ _this58.clearValidate(row, column);
6233
+ }).catch(function (_ref7) {
6234
+ var rule = _ref7.rule;
6380
6235
  if (customVal) {
6381
6236
  setCellValue(row, column, cellValue);
6382
6237
  }
6383
- _this57.showValidTooltip({
6238
+ _this58.showValidTooltip({
6384
6239
  rule: rule,
6385
6240
  row: row,
6386
6241
  column: column,
@@ -6401,14 +6256,14 @@ var Methods = {
6401
6256
  * @param {TableMergeConfig[]} merges { row: Row|number, column: ColumnInfo|number, rowspan: number, colspan: number }
6402
6257
  */
6403
6258
  setMergeCells: function setMergeCells(merges) {
6404
- var _this58 = this;
6259
+ var _this59 = this;
6405
6260
  if (this.spanMethod) {
6406
6261
  (0, _log.errLog)('vxe.error.errConflicts', ['merge-cells', 'span-method']);
6407
6262
  }
6408
6263
  setMerges(this, merges, this.mergeList, this.afterFullData);
6409
6264
  return this.$nextTick().then(function () {
6410
- _this58.updateCellAreas();
6411
- return _this58.updateStyle();
6265
+ _this59.updateCellAreas();
6266
+ return _this59.updateStyle();
6412
6267
  });
6413
6268
  },
6414
6269
  /**
@@ -6416,14 +6271,14 @@ var Methods = {
6416
6271
  * @param {TableMergeConfig[]} merges 多个或数组 [{row:Row|number, col:ColumnInfo|number}]
6417
6272
  */
6418
6273
  removeMergeCells: function removeMergeCells(merges) {
6419
- var _this59 = this;
6274
+ var _this60 = this;
6420
6275
  if (this.spanMethod) {
6421
6276
  (0, _log.errLog)('vxe.error.errConflicts', ['merge-cells', 'span-method']);
6422
6277
  }
6423
6278
  var rest = removeMerges(this, merges, this.mergeList, this.afterFullData);
6424
6279
  return this.$nextTick().then(function () {
6425
- _this59.updateCellAreas();
6426
- _this59.updateStyle();
6280
+ _this60.updateCellAreas();
6281
+ _this60.updateStyle();
6427
6282
  return rest;
6428
6283
  });
6429
6284
  },
@@ -6437,35 +6292,35 @@ var Methods = {
6437
6292
  * 清除所有单元格合并
6438
6293
  */
6439
6294
  clearMergeCells: function clearMergeCells() {
6440
- var _this60 = this;
6295
+ var _this61 = this;
6441
6296
  this.mergeList = [];
6442
6297
  return this.$nextTick().then(function () {
6443
- return _this60.updateStyle();
6298
+ return _this61.updateStyle();
6444
6299
  });
6445
6300
  },
6446
6301
  handleDefaultMergeFooterItems: function handleDefaultMergeFooterItems() {
6447
6302
  this.setMergeFooterItems(this.mergeFooterItems);
6448
6303
  },
6449
6304
  setMergeFooterItems: function setMergeFooterItems(merges) {
6450
- var _this61 = this;
6305
+ var _this62 = this;
6451
6306
  if (this.footerSpanMethod) {
6452
6307
  (0, _log.errLog)('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
6453
6308
  }
6454
6309
  setMerges(this, merges, this.mergeFooterList, null);
6455
6310
  return this.$nextTick().then(function () {
6456
- _this61.updateCellAreas();
6457
- return _this61.updateStyle();
6311
+ _this62.updateCellAreas();
6312
+ return _this62.updateStyle();
6458
6313
  });
6459
6314
  },
6460
6315
  removeMergeFooterItems: function removeMergeFooterItems(merges) {
6461
- var _this62 = this;
6316
+ var _this63 = this;
6462
6317
  if (this.footerSpanMethod) {
6463
6318
  (0, _log.errLog)('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
6464
6319
  }
6465
6320
  var rest = removeMerges(this, merges, this.mergeFooterList, null);
6466
6321
  return this.$nextTick().then(function () {
6467
- _this62.updateCellAreas();
6468
- _this62.updateStyle();
6322
+ _this63.updateCellAreas();
6323
+ _this63.updateStyle();
6469
6324
  return rest;
6470
6325
  });
6471
6326
  },
@@ -6479,10 +6334,10 @@ var Methods = {
6479
6334
  * 清除所有表尾合并
6480
6335
  */
6481
6336
  clearMergeFooterItems: function clearMergeFooterItems() {
6482
- var _this63 = this;
6337
+ var _this64 = this;
6483
6338
  this.mergeFooterList = [];
6484
6339
  return this.$nextTick().then(function () {
6485
- return _this63.updateStyle();
6340
+ return _this64.updateStyle();
6486
6341
  });
6487
6342
  },
6488
6343
  updateZindex: function updateZindex() {
@@ -6537,9 +6392,9 @@ var Methods = {
6537
6392
  return this.getCellElement(row, column);
6538
6393
  },
6539
6394
  findRowIndexOf: function findRowIndexOf(list, row) {
6540
- var _this64 = this;
6395
+ var _this65 = this;
6541
6396
  return row ? _xeUtils.default.findIndexOf(list, function (item) {
6542
- return _this64.eqRow(item, row);
6397
+ return _this65.eqRow(item, row);
6543
6398
  }) : -1;
6544
6399
  },
6545
6400
  eqRow: function eqRow(row1, row2) {