vxe-table 3.6.13 → 3.6.14-beta.1

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 (47) hide show
  1. package/lib/edit/src/mixin.js +23 -31
  2. package/lib/edit/src/mixin.min.js +1 -1
  3. package/lib/footer/src/footer.js +4 -2
  4. package/lib/footer/src/footer.min.js +1 -1
  5. package/lib/form/src/form-config-item.js +3 -1
  6. package/lib/form/src/form-config-item.min.js +1 -1
  7. package/lib/form/src/form-item.js +3 -1
  8. package/lib/form/src/form-item.min.js +1 -1
  9. package/lib/icon/style/style.css +1 -1
  10. package/lib/icon/style/style.min.css +1 -1
  11. package/lib/index.css +1 -1
  12. package/lib/index.umd.js +375 -354
  13. package/lib/index.umd.min.js +1 -1
  14. package/lib/select/src/select.js +8 -2
  15. package/lib/select/src/select.min.js +1 -1
  16. package/lib/style.css +1 -1
  17. package/lib/style.min.css +1 -1
  18. package/lib/table/src/body.js +8 -6
  19. package/lib/table/src/body.min.js +1 -1
  20. package/lib/table/src/methods.js +320 -307
  21. package/lib/table/src/methods.min.js +1 -1
  22. package/lib/table/src/table.js +3 -1
  23. package/lib/table/src/table.min.js +1 -1
  24. package/lib/tools/dom.js +1 -1
  25. package/lib/tools/dom.min.js +1 -1
  26. package/lib/tools/log.js +1 -1
  27. package/lib/tools/log.min.js +1 -1
  28. package/lib/v-x-e-table/index.js +1 -1
  29. package/lib/v-x-e-table/index.min.js +1 -1
  30. package/package.json +1 -1
  31. package/packages/edit/src/mixin.js +18 -22
  32. package/packages/footer/src/footer.js +4 -2
  33. package/packages/form/src/form-config-item.js +3 -1
  34. package/packages/form/src/form-item.js +3 -1
  35. package/packages/select/src/select.js +4 -2
  36. package/packages/table/src/body.js +8 -7
  37. package/packages/table/src/methods.js +42 -30
  38. package/packages/table/src/table.js +3 -1
  39. package/packages/tools/dom.js +1 -1
  40. package/types/table.d.ts +1 -0
  41. package/types/v-x-e-table/renderer.d.ts +9 -7
  42. /package/lib/icon/style/{iconfont.1681255874086.ttf → iconfont.1683440144042.ttf} +0 -0
  43. /package/lib/icon/style/{iconfont.1681255874086.woff → iconfont.1683440144042.woff} +0 -0
  44. /package/lib/icon/style/{iconfont.1681255874086.woff2 → iconfont.1683440144042.woff2} +0 -0
  45. /package/lib/{iconfont.1681255874086.ttf → iconfont.1683440144042.ttf} +0 -0
  46. /package/lib/{iconfont.1681255874086.woff → iconfont.1683440144042.woff} +0 -0
  47. /package/lib/{iconfont.1681255874086.woff2 → iconfont.1683440144042.woff2} +0 -0
@@ -405,8 +405,9 @@ var Methods = {
405
405
  treeOpts = this.treeOpts,
406
406
  sYOpts = this.sYOpts;
407
407
  var transform = treeOpts.transform;
408
+ var allList = fullData || this.tableFullData;
408
409
  // 如果gt为0,则总是启用
409
- var scrollYLoad = (transform || !treeConfig) && !!sYOpts.enabled && sYOpts.gt > -1 && (sYOpts.gt === 0 || sYOpts.gt <= fullData.length);
410
+ var scrollYLoad = (transform || !treeConfig) && !!sYOpts.enabled && sYOpts.gt > -1 && (sYOpts.gt === 0 || sYOpts.gt <= allList.length);
410
411
  this.scrollYLoad = scrollYLoad;
411
412
  return scrollYLoad;
412
413
  },
@@ -470,7 +471,9 @@ var Methods = {
470
471
  scrollXStore.startIndex = 0;
471
472
  scrollXStore.endIndex = 1;
472
473
  editStore.insertList = [];
474
+ editStore.insertMaps = {};
473
475
  editStore.removeList = [];
476
+ editStore.removeMaps = {};
474
477
  var sYLoad = this.updateScrollYStatus(fullData);
475
478
  this.scrollYLoad = sYLoad;
476
479
  // 全量数据
@@ -1029,47 +1032,53 @@ var Methods = {
1029
1032
  },
1030
1033
  /**
1031
1034
  * 定义行数据中的列属性,如果不存在则定义
1032
- * @param {Row} record 行数据
1035
+ * @param {Row} records 行数据
1033
1036
  */
1034
- defineField: function defineField(record) {
1037
+ defineField: function defineField(records) {
1038
+ var _this13 = this;
1035
1039
  var radioOpts = this.radioOpts,
1036
1040
  checkboxOpts = this.checkboxOpts,
1037
1041
  treeConfig = this.treeConfig,
1038
1042
  treeOpts = this.treeOpts,
1039
1043
  expandOpts = this.expandOpts;
1040
1044
  var rowkey = (0, _util.getRowkey)(this);
1041
- this.tableFullColumn.forEach(function (column) {
1042
- var field = column.field,
1043
- editRender = column.editRender;
1044
- if (field && !_xeUtils["default"].has(record, field)) {
1045
- var cellValue = null;
1046
- if (editRender) {
1047
- var defaultValue = editRender.defaultValue;
1048
- if (_xeUtils["default"].isFunction(defaultValue)) {
1049
- cellValue = defaultValue({
1050
- column: column
1051
- });
1052
- } else if (!_xeUtils["default"].isUndefined(defaultValue)) {
1053
- cellValue = defaultValue;
1045
+ if (!_xeUtils["default"].isArray(records)) {
1046
+ records = [records];
1047
+ }
1048
+ return records.map(function (record) {
1049
+ _this13.tableFullColumn.forEach(function (column) {
1050
+ var field = column.field,
1051
+ editRender = column.editRender;
1052
+ if (field && !_xeUtils["default"].has(record, field)) {
1053
+ var cellValue = null;
1054
+ if (editRender) {
1055
+ var defaultValue = editRender.defaultValue;
1056
+ if (_xeUtils["default"].isFunction(defaultValue)) {
1057
+ cellValue = defaultValue({
1058
+ column: column
1059
+ });
1060
+ } else if (!_xeUtils["default"].isUndefined(defaultValue)) {
1061
+ cellValue = defaultValue;
1062
+ }
1054
1063
  }
1064
+ _xeUtils["default"].set(record, field, cellValue);
1065
+ }
1066
+ });
1067
+ var otherFields = [radioOpts.labelField, checkboxOpts.checkField, checkboxOpts.labelField, expandOpts.labelField];
1068
+ otherFields.forEach(function (key) {
1069
+ if (key && (0, _utils.eqEmptyValue)(_xeUtils["default"].get(record, key))) {
1070
+ _xeUtils["default"].set(record, key, null);
1055
1071
  }
1056
- _xeUtils["default"].set(record, field, cellValue);
1072
+ });
1073
+ if (treeConfig && treeOpts.lazy && _xeUtils["default"].isUndefined(record[treeOpts.children])) {
1074
+ record[treeOpts.children] = null;
1057
1075
  }
1058
- });
1059
- var otherFields = [radioOpts.labelField, checkboxOpts.checkField, checkboxOpts.labelField, expandOpts.labelField];
1060
- otherFields.forEach(function (key) {
1061
- if (key && (0, _utils.eqEmptyValue)(_xeUtils["default"].get(record, key))) {
1062
- _xeUtils["default"].set(record, key, null);
1076
+ // 必须有行数据的唯一主键,可以自行设置;也可以默认生成一个随机数
1077
+ if ((0, _utils.eqEmptyValue)(_xeUtils["default"].get(record, rowkey))) {
1078
+ _xeUtils["default"].set(record, rowkey, getRowUniqueId());
1063
1079
  }
1080
+ return record;
1064
1081
  });
1065
- if (treeConfig && treeOpts.lazy && _xeUtils["default"].isUndefined(record[treeOpts.children])) {
1066
- record[treeOpts.children] = null;
1067
- }
1068
- // 必须有行数据的唯一主键,可以自行设置;也可以默认生成一个随机数
1069
- if ((0, _utils.eqEmptyValue)(_xeUtils["default"].get(record, rowkey))) {
1070
- _xeUtils["default"].set(record, rowkey, getRowUniqueId());
1071
- }
1072
- return record;
1073
1082
  },
1074
1083
  /**
1075
1084
  * 创建 data 对象
@@ -1077,11 +1086,11 @@ var Methods = {
1077
1086
  * @param {Array} records 新数据
1078
1087
  */
1079
1088
  createData: function createData(records) {
1080
- var _this13 = this;
1089
+ var _this14 = this;
1081
1090
  var treeConfig = this.treeConfig,
1082
1091
  treeOpts = this.treeOpts;
1083
1092
  var handleRrecord = function handleRrecord(record) {
1084
- return _this13.defineField(Object.assign({}, record));
1093
+ return _this14.defineField(Object.assign({}, record));
1085
1094
  };
1086
1095
  var rows = treeConfig ? _xeUtils["default"].mapTree(records, handleRrecord, treeOpts) : records.map(handleRrecord);
1087
1096
  return this.$nextTick().then(function () {
@@ -1094,13 +1103,13 @@ var Methods = {
1094
1103
  * @param {Array/Object} records 新数据
1095
1104
  */
1096
1105
  createRow: function createRow(records) {
1097
- var _this14 = this;
1106
+ var _this15 = this;
1098
1107
  var isArr = _xeUtils["default"].isArray(records);
1099
1108
  if (!isArr) {
1100
1109
  records = [records];
1101
1110
  }
1102
1111
  return this.$nextTick().then(function () {
1103
- return _this14.createData(records).then(function (rows) {
1112
+ return _this15.createData(records).then(function (rows) {
1104
1113
  return isArr ? rows : rows[0];
1105
1114
  });
1106
1115
  });
@@ -1113,7 +1122,7 @@ var Methods = {
1113
1122
  * 如果还额外传了 field 则还原指定的单元格数据
1114
1123
  */
1115
1124
  revertData: function revertData(rows, field) {
1116
- var _this15 = this;
1125
+ var _this16 = this;
1117
1126
  var keepSource = this.keepSource,
1118
1127
  tableSourceData = this.tableSourceData,
1119
1128
  treeConfig = this.treeConfig;
@@ -1133,8 +1142,8 @@ var Methods = {
1133
1142
  }
1134
1143
  if (targetRows.length) {
1135
1144
  targetRows.forEach(function (row) {
1136
- if (!_this15.isInsertByRow(row)) {
1137
- var rowIndex = _this15.getRowIndex(row);
1145
+ if (!_this16.isInsertByRow(row)) {
1146
+ var rowIndex = _this16.getRowIndex(row);
1138
1147
  if (treeConfig && rowIndex === -1) {
1139
1148
  (0, _log.errLog)('vxe.error.noTree', ['revertData']);
1140
1149
  }
@@ -1191,7 +1200,9 @@ var Methods = {
1191
1200
  * @param {Row} row 行对象
1192
1201
  */
1193
1202
  isInsertByRow: function isInsertByRow(row) {
1194
- return this.editStore.insertList.indexOf(row) > -1;
1203
+ var editStore = this.editStore;
1204
+ var rowid = (0, _util.getRowid)(this, row);
1205
+ return editStore.insertList.length && editStore.insertMaps[rowid];
1195
1206
  },
1196
1207
  /**
1197
1208
  * 删除所有新增的临时数据
@@ -1206,7 +1217,7 @@ var Methods = {
1206
1217
  * @param {String} field 字段名
1207
1218
  */
1208
1219
  isUpdateByRow: function isUpdateByRow(row, field) {
1209
- var _this16 = this;
1220
+ var _this17 = this;
1210
1221
  var visibleColumn = this.visibleColumn,
1211
1222
  keepSource = this.keepSource,
1212
1223
  treeConfig = this.treeConfig,
@@ -1223,7 +1234,7 @@ var Methods = {
1223
1234
  if (treeConfig) {
1224
1235
  var children = treeOpts.children;
1225
1236
  var matchObj = _xeUtils["default"].findTree(tableSourceData, function (item) {
1226
- return rowid === (0, _util.getRowid)(_this16, item);
1237
+ return rowid === (0, _util.getRowid)(_this17, item);
1227
1238
  }, treeOpts);
1228
1239
  row = Object.assign({}, row, _defineProperty({}, children, null));
1229
1240
  if (matchObj) {
@@ -1294,7 +1305,7 @@ var Methods = {
1294
1305
  * 用于多选行,获取已选中的数据
1295
1306
  */
1296
1307
  getCheckboxRecords: function getCheckboxRecords(isFull) {
1297
- var _this17 = this;
1308
+ var _this18 = this;
1298
1309
  var tableFullData = this.tableFullData,
1299
1310
  afterFullData = this.afterFullData,
1300
1311
  treeConfig = this.treeConfig,
@@ -1324,13 +1335,13 @@ var Methods = {
1324
1335
  var selection = this.selection;
1325
1336
  if (treeConfig) {
1326
1337
  rowList = _xeUtils["default"].filterTree(currTableData, function (row) {
1327
- return _this17.findRowIndexOf(selection, row) > -1;
1338
+ return _this18.findRowIndexOf(selection, row) > -1;
1328
1339
  }, {
1329
1340
  children: transform ? mapChildren : children
1330
1341
  });
1331
1342
  } else {
1332
1343
  rowList = currTableData.filter(function (row) {
1333
- return _this17.findRowIndexOf(selection, row) > -1;
1344
+ return _this18.findRowIndexOf(selection, row) > -1;
1334
1345
  });
1335
1346
  }
1336
1347
  }
@@ -1368,7 +1379,7 @@ var Methods = {
1368
1379
  * 如果存在筛选条件,继续处理
1369
1380
  */
1370
1381
  updateAfterFullData: function updateAfterFullData() {
1371
- var _this18 = this;
1382
+ var _this19 = this;
1372
1383
  var tableFullColumn = this.tableFullColumn,
1373
1384
  tableFullData = this.tableFullData,
1374
1385
  filterOpts = this.filterOpts,
@@ -1444,7 +1455,7 @@ var Methods = {
1444
1455
  cellValue: cellValue,
1445
1456
  row: row,
1446
1457
  column: column,
1447
- $table: _this18
1458
+ $table: _this19
1448
1459
  });
1449
1460
  });
1450
1461
  } else if (compFilterMethod) {
@@ -1455,7 +1466,7 @@ var Methods = {
1455
1466
  cellValue: cellValue,
1456
1467
  row: row,
1457
1468
  column: column,
1458
- $table: _this18
1469
+ $table: _this19
1459
1470
  });
1460
1471
  });
1461
1472
  } else if (allFilterMethod) {
@@ -1474,7 +1485,7 @@ var Methods = {
1474
1485
  cellValue: cellValue,
1475
1486
  row: row,
1476
1487
  column: column,
1477
- $table: _this18
1488
+ $table: _this19
1478
1489
  });
1479
1490
  });
1480
1491
  }
@@ -1522,7 +1533,7 @@ var Methods = {
1522
1533
  tableTree = _xeUtils["default"].orderBy(tableTree, orderColumns.map(function (_ref2) {
1523
1534
  var column = _ref2.column,
1524
1535
  order = _ref2.order;
1525
- return [getOrderField(_this18, column), order];
1536
+ return [getOrderField(_this19, column), order];
1526
1537
  }));
1527
1538
  }
1528
1539
  tableData = tableTree;
@@ -1544,7 +1555,7 @@ var Methods = {
1544
1555
  tableData = _xeUtils["default"].orderBy(tableData, orderColumns.map(function (_ref3) {
1545
1556
  var column = _ref3.column,
1546
1557
  order = _ref3.order;
1547
- return [getOrderField(_this18, column), order];
1558
+ return [getOrderField(_this19, column), order];
1548
1559
  }));
1549
1560
  } else {
1550
1561
  // 兼容 v2,在 v4 中废弃, sortBy 不能为数组
@@ -1557,7 +1568,7 @@ var Methods = {
1557
1568
  tableData = _xeUtils["default"].orderBy(tableData, sortByConfs || [firstOrderColumn].map(function (_ref4) {
1558
1569
  var column = _ref4.column,
1559
1570
  order = _ref4.order;
1560
- return [getOrderField(_this18, column), order];
1571
+ return [getOrderField(_this19, column), order];
1561
1572
  }));
1562
1573
  }
1563
1574
  }
@@ -1573,7 +1584,7 @@ var Methods = {
1573
1584
  * 对渲染中的数据提前解析序号及索引。牺牲提前编译耗时换取渲染中额外损耗,使运行时更加流畅
1574
1585
  */
1575
1586
  updateAfterDataIndex: function updateAfterDataIndex() {
1576
- var _this19 = this;
1587
+ var _this20 = this;
1577
1588
  var treeConfig = this.treeConfig,
1578
1589
  afterFullData = this.afterFullData,
1579
1590
  fullDataRowIdData = this.fullDataRowIdData,
@@ -1582,7 +1593,7 @@ var Methods = {
1582
1593
  treeOpts = this.treeOpts;
1583
1594
  if (treeConfig) {
1584
1595
  _xeUtils["default"].eachTree(afterTreeFullData, function (row, index, items, path) {
1585
- var rowid = (0, _util.getRowid)(_this19, row);
1596
+ var rowid = (0, _util.getRowid)(_this20, row);
1586
1597
  var allrest = fullAllDataRowIdData[rowid];
1587
1598
  var seq = path.map(function (num, i) {
1588
1599
  return i % 2 === 0 ? Number(num) + 1 : '.';
@@ -1610,7 +1621,7 @@ var Methods = {
1610
1621
  });
1611
1622
  } else {
1612
1623
  afterFullData.forEach(function (row, index) {
1613
- var rowid = (0, _util.getRowid)(_this19, row);
1624
+ var rowid = (0, _util.getRowid)(_this20, row);
1614
1625
  var allrest = fullAllDataRowIdData[rowid];
1615
1626
  var seq = index + 1;
1616
1627
  if (allrest) {
@@ -1692,7 +1703,7 @@ var Methods = {
1692
1703
  * 默认执行一次,除非被重置
1693
1704
  */
1694
1705
  handleLoadDefaults: function handleLoadDefaults() {
1695
- var _this20 = this;
1706
+ var _this21 = this;
1696
1707
  if (this.checkboxConfig) {
1697
1708
  this.handleDefaultSelectionChecked();
1698
1709
  }
@@ -1712,7 +1723,7 @@ var Methods = {
1712
1723
  this.handleDefaultMergeFooterItems();
1713
1724
  }
1714
1725
  this.$nextTick(function () {
1715
- return setTimeout(_this20.recalculate);
1726
+ return setTimeout(_this21.recalculate);
1716
1727
  });
1717
1728
  },
1718
1729
  /**
@@ -1950,11 +1961,11 @@ var Methods = {
1950
1961
  * 刷新列配置
1951
1962
  */
1952
1963
  refreshColumn: function refreshColumn() {
1953
- var _this21 = this;
1964
+ var _this22 = this;
1954
1965
  return this.parseColumns().then(function () {
1955
- return _this21.refreshScroll();
1966
+ return _this22.refreshScroll();
1956
1967
  }).then(function () {
1957
- return _this21.recalculate();
1968
+ return _this22.recalculate();
1958
1969
  });
1959
1970
  },
1960
1971
  /**
@@ -1962,7 +1973,7 @@ var Methods = {
1962
1973
  * 将固定的列左边、右边分别靠边
1963
1974
  */
1964
1975
  parseColumns: function parseColumns() {
1965
- var _this22 = this;
1976
+ var _this23 = this;
1966
1977
  var leftList = [];
1967
1978
  var centerList = [];
1968
1979
  var rightList = [];
@@ -2068,10 +2079,10 @@ var Methods = {
2068
2079
  this.visibleColumn = visibleColumn;
2069
2080
  this.handleTableColumn();
2070
2081
  return this.updateFooter().then(function () {
2071
- return _this22.recalculate();
2082
+ return _this23.recalculate();
2072
2083
  }).then(function () {
2073
- _this22.updateCellAreas();
2074
- return _this22.recalculate();
2084
+ _this23.updateCellAreas();
2085
+ return _this23.recalculate();
2075
2086
  });
2076
2087
  },
2077
2088
  /**
@@ -2123,7 +2134,7 @@ var Methods = {
2123
2134
  * 刷新滚动操作,手动同步滚动相关位置(对于某些特殊的操作,比如滚动条错位、固定列不同步)
2124
2135
  */
2125
2136
  refreshScroll: function refreshScroll() {
2126
- var _this23 = this;
2137
+ var _this24 = this;
2127
2138
  var lastScrollLeft = this.lastScrollLeft,
2128
2139
  lastScrollTop = this.lastScrollTop;
2129
2140
  var $refs = this.$refs;
@@ -2138,7 +2149,7 @@ var Methods = {
2138
2149
  return new Promise(function (resolve) {
2139
2150
  // 还原滚动条位置
2140
2151
  if (lastScrollLeft || lastScrollTop) {
2141
- return (0, _util.restoreScrollLocation)(_this23, lastScrollLeft, lastScrollTop).then(function () {
2152
+ return (0, _util.restoreScrollLocation)(_this24, lastScrollLeft, lastScrollTop).then(function () {
2142
2153
  // 存在滚动行为未结束情况
2143
2154
  setTimeout(resolve, 30);
2144
2155
  });
@@ -2157,7 +2168,7 @@ var Methods = {
2157
2168
  * 支持 width=? width=?px width=?% min-width=? min-width=?px min-width=?%
2158
2169
  */
2159
2170
  recalculate: function recalculate(refull) {
2160
- var _this24 = this;
2171
+ var _this25 = this;
2161
2172
  var $refs = this.$refs;
2162
2173
  var tableBody = $refs.tableBody,
2163
2174
  tableHeader = $refs.tableHeader,
@@ -2170,8 +2181,8 @@ var Methods = {
2170
2181
  if (refull === true) {
2171
2182
  // 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
2172
2183
  return this.computeScrollLoad().then(function () {
2173
- _this24.autoCellWidth(headerElem, bodyElem, footerElem);
2174
- return _this24.computeScrollLoad();
2184
+ _this25.autoCellWidth(headerElem, bodyElem, footerElem);
2185
+ return _this25.computeScrollLoad();
2175
2186
  });
2176
2187
  }
2177
2188
  }
@@ -2305,7 +2316,7 @@ var Methods = {
2305
2316
  this.customMaxHeight = calcHeight(this, 'maxHeight');
2306
2317
  },
2307
2318
  updateStyle: function updateStyle() {
2308
- var _this25 = this;
2319
+ var _this26 = this;
2309
2320
  var $refs = this.$refs,
2310
2321
  isGroup = this.isGroup,
2311
2322
  fullColumnIdData = this.fullColumnIdData,
@@ -2393,7 +2404,7 @@ var Methods = {
2393
2404
  var listElem = elemStore["".concat(name, "-").concat(layout, "-list")];
2394
2405
  if (isGroup && listElem) {
2395
2406
  _xeUtils["default"].arrayEach(listElem.querySelectorAll('.col--group'), function (thElem) {
2396
- var colNode = _this25.getColumnNode(thElem);
2407
+ var colNode = _this26.getColumnNode(thElem);
2397
2408
  if (colNode) {
2398
2409
  var column = colNode.item;
2399
2410
  var showHeaderOverflow = column.showHeaderOverflow;
@@ -2447,7 +2458,8 @@ var Methods = {
2447
2458
 
2448
2459
  // 如果是使用优化模式
2449
2460
  if (fixedType) {
2450
- if (scrollXLoad || scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow)) {
2461
+ // 如果存在展开行使用全量渲染
2462
+ if (!_this26.expandColumn && (scrollXLoad || scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow))) {
2451
2463
  if (!mergeList.length && !spanMethod && !(keyboardConfig && keyboardOpts.isMerge)) {
2452
2464
  _renderColumnList = fixedColumn;
2453
2465
  } else {
@@ -2474,7 +2486,8 @@ var Methods = {
2474
2486
 
2475
2487
  // 如果是使用优化模式
2476
2488
  if (fixedType) {
2477
- if (scrollXLoad || allColumnFooterOverflow) {
2489
+ // 如果存在展开行使用全量渲染
2490
+ if (!_this26.expandColumn && (scrollXLoad || allColumnFooterOverflow)) {
2478
2491
  if (!mergeFooterList.length || !footerSpanMethod) {
2479
2492
  _renderColumnList2 = fixedColumn;
2480
2493
  } else {
@@ -2541,9 +2554,9 @@ var Methods = {
2541
2554
  var colWidth = column.renderWidth;
2542
2555
  if (cellElem) {
2543
2556
  if (colspan > 1) {
2544
- var columnIndex = _this25.getColumnIndex(column);
2557
+ var columnIndex = _this26.getColumnIndex(column);
2545
2558
  for (var _index = 1; _index < colspan; _index++) {
2546
- var nextColumn = _this25.getColumns(columnIndex + _index);
2559
+ var nextColumn = _this26.getColumns(columnIndex + _index);
2547
2560
  if (nextColumn) {
2548
2561
  colWidth += nextColumn.renderWidth;
2549
2562
  }
@@ -2585,13 +2598,13 @@ var Methods = {
2585
2598
  }
2586
2599
  },
2587
2600
  preventEvent: function preventEvent(evnt, type, args, next, end) {
2588
- var _this26 = this;
2601
+ var _this27 = this;
2589
2602
  var evntList = _vXETable["default"].interceptor.get(type);
2590
2603
  var rest;
2591
2604
  if (!evntList.some(function (func) {
2592
2605
  return func(Object.assign({
2593
- $grid: _this26.$xegrid,
2594
- $table: _this26,
2606
+ $grid: _this27.$xegrid,
2607
+ $table: _this27,
2595
2608
  $event: evnt
2596
2609
  }, args)) === false;
2597
2610
  })) {
@@ -2608,7 +2621,7 @@ var Methods = {
2608
2621
  * 全局按下事件处理
2609
2622
  */
2610
2623
  handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
2611
- var _this27 = this;
2624
+ var _this28 = this;
2612
2625
  var $el = this.$el,
2613
2626
  $refs = this.$refs,
2614
2627
  $xegrid = this.$xegrid,
@@ -2664,7 +2677,7 @@ var Methods = {
2664
2677
  isClearActived = getEventTargetNode(evnt, $el, 'vxe-footer--row').flag;
2665
2678
  }
2666
2679
  // 如果固定了高度且点击了行之外的空白处,则清除激活状态
2667
- if (!isClearActived && _this27.height && !_this27.overflowY) {
2680
+ if (!isClearActived && _this28.height && !_this28.overflowY) {
2668
2681
  var bodyWrapperElem = evnt.target;
2669
2682
  if (hasClass(bodyWrapperElem, 'vxe-table--body-wrapper')) {
2670
2683
  isClearActived = evnt.offsetY < bodyWrapperElem.clientHeight;
@@ -2674,7 +2687,7 @@ var Methods = {
2674
2687
  // 如果点击了当前表格之外
2675
2688
  !getEventTargetNode(evnt, $el).flag) {
2676
2689
  setTimeout(function () {
2677
- return _this27.clearEdit(evnt);
2690
+ return _this28.clearEdit(evnt);
2678
2691
  });
2679
2692
  }
2680
2693
  });
@@ -2687,8 +2700,8 @@ var Methods = {
2687
2700
  this.clearSelected();
2688
2701
  if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-areas-clear').flag) {
2689
2702
  this.preventEvent(evnt, 'event.clearAreas', {}, function () {
2690
- _this27.clearCellAreas();
2691
- _this27.clearCopyCellArea();
2703
+ _this28.clearCellAreas();
2704
+ _this28.clearCopyCellArea();
2692
2705
  });
2693
2706
  }
2694
2707
  }
@@ -2718,7 +2731,7 @@ var Methods = {
2718
2731
  * 表格键盘事件
2719
2732
  */
2720
2733
  keydownEvent: function keydownEvent(evnt) {
2721
- var _this28 = this;
2734
+ var _this29 = this;
2722
2735
  var filterStore = this.filterStore,
2723
2736
  ctxMenuStore = this.ctxMenuStore,
2724
2737
  editStore = this.editStore,
@@ -2731,30 +2744,30 @@ var Methods = {
2731
2744
  var isEsc = keyCode === 27;
2732
2745
  if (isEsc) {
2733
2746
  this.preventEvent(evnt, 'event.keydown', null, function () {
2734
- _this28.emitEvent('keydown-start', {}, evnt);
2735
- if (keyboardConfig && mouseConfig && mouseOpts.area && _this28.handleKeyboardEvent) {
2736
- _this28.handleKeyboardEvent(evnt);
2747
+ _this29.emitEvent('keydown-start', {}, evnt);
2748
+ if (keyboardConfig && mouseConfig && mouseOpts.area && _this29.handleKeyboardEvent) {
2749
+ _this29.handleKeyboardEvent(evnt);
2737
2750
  } else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
2738
2751
  evnt.stopPropagation();
2739
2752
  // 如果按下了 Esc 键,关闭快捷菜单、筛选
2740
- _this28.closeFilter();
2741
- _this28.closeMenu();
2753
+ _this29.closeFilter();
2754
+ _this29.closeMenu();
2742
2755
  if (keyboardConfig && keyboardOpts.isEsc) {
2743
2756
  // 如果是激活编辑状态,则取消编辑
2744
2757
  if (actived.row) {
2745
2758
  var params = actived.args;
2746
- _this28.clearEdit(evnt);
2759
+ _this29.clearEdit(evnt);
2747
2760
  // 如果配置了选中功能,则为选中状态
2748
2761
  if (mouseConfig && mouseOpts.selected) {
2749
- _this28.$nextTick(function () {
2750
- return _this28.handleSelected(params, evnt);
2762
+ _this29.$nextTick(function () {
2763
+ return _this29.handleSelected(params, evnt);
2751
2764
  });
2752
2765
  }
2753
2766
  }
2754
2767
  }
2755
2768
  }
2756
- _this28.emitEvent('keydown', {}, evnt);
2757
- _this28.emitEvent('keydown-end', {}, evnt);
2769
+ _this29.emitEvent('keydown', {}, evnt);
2770
+ _this29.emitEvent('keydown-end', {}, evnt);
2758
2771
  });
2759
2772
  }
2760
2773
  },
@@ -2762,26 +2775,26 @@ var Methods = {
2762
2775
  * 全局键盘事件
2763
2776
  */
2764
2777
  handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
2765
- var _this29 = this;
2778
+ var _this30 = this;
2766
2779
  // 该行为只对当前激活的表格有效
2767
2780
  if (this.isActivated) {
2768
2781
  this.preventEvent(evnt, 'event.keydown', null, function () {
2769
- var filterStore = _this29.filterStore,
2770
- isCtxMenu = _this29.isCtxMenu,
2771
- ctxMenuStore = _this29.ctxMenuStore,
2772
- editStore = _this29.editStore,
2773
- editOpts = _this29.editOpts,
2774
- editConfig = _this29.editConfig,
2775
- mouseConfig = _this29.mouseConfig,
2776
- mouseOpts = _this29.mouseOpts,
2777
- keyboardConfig = _this29.keyboardConfig,
2778
- keyboardOpts = _this29.keyboardOpts,
2779
- treeConfig = _this29.treeConfig,
2780
- treeOpts = _this29.treeOpts,
2781
- highlightCurrentRow = _this29.highlightCurrentRow,
2782
- currentRow = _this29.currentRow,
2783
- bodyCtxMenu = _this29.bodyCtxMenu,
2784
- rowOpts = _this29.rowOpts;
2782
+ var filterStore = _this30.filterStore,
2783
+ isCtxMenu = _this30.isCtxMenu,
2784
+ ctxMenuStore = _this30.ctxMenuStore,
2785
+ editStore = _this30.editStore,
2786
+ editOpts = _this30.editOpts,
2787
+ editConfig = _this30.editConfig,
2788
+ mouseConfig = _this30.mouseConfig,
2789
+ mouseOpts = _this30.mouseOpts,
2790
+ keyboardConfig = _this30.keyboardConfig,
2791
+ keyboardOpts = _this30.keyboardOpts,
2792
+ treeConfig = _this30.treeConfig,
2793
+ treeOpts = _this30.treeOpts,
2794
+ highlightCurrentRow = _this30.highlightCurrentRow,
2795
+ currentRow = _this30.currentRow,
2796
+ bodyCtxMenu = _this30.bodyCtxMenu,
2797
+ rowOpts = _this30.rowOpts;
2785
2798
  var selected = editStore.selected,
2786
2799
  actived = editStore.actived;
2787
2800
  var keyCode = evnt.keyCode;
@@ -2807,7 +2820,7 @@ var Methods = {
2807
2820
  var params;
2808
2821
  if (filterStore.visible) {
2809
2822
  if (isEsc) {
2810
- _this29.closeFilter();
2823
+ _this30.closeFilter();
2811
2824
  }
2812
2825
  return;
2813
2826
  }
@@ -2815,19 +2828,19 @@ var Methods = {
2815
2828
  // 如果配置了右键菜单; 支持方向键操作、回车
2816
2829
  evnt.preventDefault();
2817
2830
  if (ctxMenuStore.showChild && hasChildrenList(ctxMenuStore.selected)) {
2818
- _this29.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selectChild', 37, false, ctxMenuStore.selected.children);
2831
+ _this30.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selectChild', 37, false, ctxMenuStore.selected.children);
2819
2832
  } else {
2820
- _this29.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selected', 39, true, _this29.ctxMenuList);
2833
+ _this30.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selected', 39, true, _this30.ctxMenuList);
2821
2834
  }
2822
- } else if (keyboardConfig && mouseConfig && mouseOpts.area && _this29.handleKeyboardEvent) {
2823
- _this29.handleKeyboardEvent(evnt);
2835
+ } else if (keyboardConfig && mouseConfig && mouseOpts.area && _this30.handleKeyboardEvent) {
2836
+ _this30.handleKeyboardEvent(evnt);
2824
2837
  } else if (keyboardConfig && isSpacebar && keyboardOpts.isChecked && selected.row && selected.column && (selected.column.type === 'checkbox' || selected.column.type === 'radio')) {
2825
2838
  // 空格键支持选中复选框
2826
2839
  evnt.preventDefault();
2827
2840
  if (selected.column.type === 'checkbox') {
2828
- _this29.handleToggleCheckRowEvent(evnt, selected.args);
2841
+ _this30.handleToggleCheckRowEvent(evnt, selected.args);
2829
2842
  } else {
2830
- _this29.triggerRadioRowEvent(evnt, selected.args);
2843
+ _this30.triggerRadioRowEvent(evnt, selected.args);
2831
2844
  }
2832
2845
  } else if (isF2 && (0, _utils.isEnableConf)(editConfig)) {
2833
2846
  if (!isEditStatus) {
@@ -2835,15 +2848,15 @@ var Methods = {
2835
2848
  if (selected.row && selected.column) {
2836
2849
  evnt.stopPropagation();
2837
2850
  evnt.preventDefault();
2838
- _this29.handleActived(selected.args, evnt);
2851
+ _this30.handleActived(selected.args, evnt);
2839
2852
  }
2840
2853
  }
2841
2854
  } else if (isContextMenu) {
2842
2855
  // 如果按下上下文键
2843
- _this29._keyCtx = selected.row && selected.column && bodyCtxMenu.length;
2844
- clearTimeout(_this29.keyCtxTimeout);
2845
- _this29.keyCtxTimeout = setTimeout(function () {
2846
- _this29._keyCtx = false;
2856
+ _this30._keyCtx = selected.row && selected.column && bodyCtxMenu.length;
2857
+ clearTimeout(_this30.keyCtxTimeout);
2858
+ _this30.keyCtxTimeout = setTimeout(function () {
2859
+ _this30._keyCtx = false;
2847
2860
  }, 1000);
2848
2861
  } else if (isEnter && !hasAltKey && keyboardConfig && keyboardOpts.isEnter && (selected.row || actived.row || treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow)) {
2849
2862
  // 退出选中
@@ -2851,11 +2864,11 @@ var Methods = {
2851
2864
  // 如果是激活编辑状态,则取消编辑
2852
2865
  if (actived.row) {
2853
2866
  params = actived.args;
2854
- _this29.clearEdit(evnt);
2867
+ _this30.clearEdit(evnt);
2855
2868
  // 如果配置了选中功能,则为选中状态
2856
2869
  if (mouseConfig && mouseOpts.selected) {
2857
- _this29.$nextTick(function () {
2858
- return _this29.handleSelected(params, evnt);
2870
+ _this30.$nextTick(function () {
2871
+ return _this30.handleSelected(params, evnt);
2859
2872
  });
2860
2873
  }
2861
2874
  }
@@ -2865,15 +2878,15 @@ var Methods = {
2865
2878
  var targetArgs = selected.row ? selected.args : actived.args;
2866
2879
  if (hasShiftKey) {
2867
2880
  if (keyboardOpts.enterToTab) {
2868
- _this29.moveTabSelected(targetArgs, hasShiftKey, evnt);
2881
+ _this30.moveTabSelected(targetArgs, hasShiftKey, evnt);
2869
2882
  } else {
2870
- _this29.moveSelected(targetArgs, isLeftArrow, true, isRightArrow, false, evnt);
2883
+ _this30.moveSelected(targetArgs, isLeftArrow, true, isRightArrow, false, evnt);
2871
2884
  }
2872
2885
  } else {
2873
2886
  if (keyboardOpts.enterToTab) {
2874
- _this29.moveTabSelected(targetArgs, hasShiftKey, evnt);
2887
+ _this30.moveTabSelected(targetArgs, hasShiftKey, evnt);
2875
2888
  } else {
2876
- _this29.moveSelected(targetArgs, isLeftArrow, false, isRightArrow, true, evnt);
2889
+ _this30.moveSelected(targetArgs, isLeftArrow, false, isRightArrow, true, evnt);
2877
2890
  }
2878
2891
  }
2879
2892
  } else if (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
@@ -2883,13 +2896,13 @@ var Methods = {
2883
2896
  evnt.preventDefault();
2884
2897
  var targetRow = childrens[0];
2885
2898
  params = {
2886
- $table: _this29,
2899
+ $table: _this30,
2887
2900
  row: targetRow
2888
2901
  };
2889
- _this29.setTreeExpand(currentRow, true).then(function () {
2890
- return _this29.scrollToRow(targetRow);
2902
+ _this30.setTreeExpand(currentRow, true).then(function () {
2903
+ return _this30.scrollToRow(targetRow);
2891
2904
  }).then(function () {
2892
- return _this29.triggerCurrentRowEvent(evnt, params);
2905
+ return _this30.triggerCurrentRowEvent(evnt, params);
2893
2906
  });
2894
2907
  }
2895
2908
  }
@@ -2898,18 +2911,18 @@ var Methods = {
2898
2911
  if (!isEditStatus) {
2899
2912
  // 如果按下了方向键
2900
2913
  if (selected.row && selected.column) {
2901
- _this29.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
2914
+ _this30.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
2902
2915
  } else if ((isUpArrow || isDwArrow) && (rowOpts.isCurrent || highlightCurrentRow)) {
2903
2916
  // 当前行按键上下移动
2904
- _this29.moveCurrentRow(isUpArrow, isDwArrow, evnt);
2917
+ _this30.moveCurrentRow(isUpArrow, isDwArrow, evnt);
2905
2918
  }
2906
2919
  }
2907
2920
  } else if (isTab && keyboardConfig && keyboardOpts.isTab) {
2908
2921
  // 如果按下了 Tab 键切换
2909
2922
  if (selected.row || selected.column) {
2910
- _this29.moveTabSelected(selected.args, hasShiftKey, evnt);
2923
+ _this30.moveTabSelected(selected.args, hasShiftKey, evnt);
2911
2924
  } else if (actived.row || actived.column) {
2912
- _this29.moveTabSelected(actived.args, hasShiftKey, evnt);
2925
+ _this30.moveTabSelected(actived.args, hasShiftKey, evnt);
2913
2926
  }
2914
2927
  } else if (keyboardConfig && (isDel || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow ? isBack && keyboardOpts.isArrow : isBack))) {
2915
2928
  if (!isEditStatus) {
@@ -2920,10 +2933,10 @@ var Methods = {
2920
2933
  if (delMethod) {
2921
2934
  delMethod({
2922
2935
  row: selected.row,
2923
- rowIndex: _this29.getRowIndex(selected.row),
2936
+ rowIndex: _this30.getRowIndex(selected.row),
2924
2937
  column: selected.column,
2925
- columnIndex: _this29.getColumnIndex(selected.column),
2926
- $table: _this29
2938
+ columnIndex: _this30.getColumnIndex(selected.column),
2939
+ $table: _this30
2927
2940
  });
2928
2941
  } else {
2929
2942
  setCellValue(selected.row, selected.column, null);
@@ -2932,34 +2945,34 @@ var Methods = {
2932
2945
  if (backMethod) {
2933
2946
  backMethod({
2934
2947
  row: selected.row,
2935
- rowIndex: _this29.getRowIndex(selected.row),
2948
+ rowIndex: _this30.getRowIndex(selected.row),
2936
2949
  column: selected.column,
2937
- columnIndex: _this29.getColumnIndex(selected.column),
2938
- $table: _this29
2950
+ columnIndex: _this30.getColumnIndex(selected.column),
2951
+ $table: _this30
2939
2952
  });
2940
2953
  } else {
2941
- _this29.handleActived(selected.args, evnt);
2954
+ _this30.handleActived(selected.args, evnt);
2942
2955
  }
2943
2956
  } else if (isDel) {
2944
2957
  // 如果按下 del 键,更新表尾数据
2945
- _this29.updateFooter();
2958
+ _this30.updateFooter();
2946
2959
  }
2947
2960
  } else if (isBack && keyboardOpts.isArrow && treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
2948
2961
  // 如果树形表格回退键关闭当前行返回父节点
2949
- var _XEUtils$findTree = _xeUtils["default"].findTree(_this29.afterFullData, function (item) {
2962
+ var _XEUtils$findTree = _xeUtils["default"].findTree(_this30.afterFullData, function (item) {
2950
2963
  return item === currentRow;
2951
2964
  }, treeOpts),
2952
2965
  parentRow = _XEUtils$findTree.parent;
2953
2966
  if (parentRow) {
2954
2967
  evnt.preventDefault();
2955
2968
  params = {
2956
- $table: _this29,
2969
+ $table: _this30,
2957
2970
  row: parentRow
2958
2971
  };
2959
- _this29.setTreeExpand(parentRow, false).then(function () {
2960
- return _this29.scrollToRow(parentRow);
2972
+ _this30.setTreeExpand(parentRow, false).then(function () {
2973
+ return _this30.scrollToRow(parentRow);
2961
2974
  }).then(function () {
2962
- return _this29.triggerCurrentRowEvent(evnt, params);
2975
+ return _this30.triggerCurrentRowEvent(evnt, params);
2963
2976
  });
2964
2977
  }
2965
2978
  }
@@ -2974,24 +2987,24 @@ var Methods = {
2974
2987
  if (selected.column && selected.row && (0, _utils.isEnableConf)(selected.column.editRender)) {
2975
2988
  var beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod;
2976
2989
  if (!beforeEditMethod || beforeEditMethod(_objectSpread(_objectSpread({}, selected.args), {}, {
2977
- $table: _this29
2990
+ $table: _this30
2978
2991
  }))) {
2979
2992
  if (editMethod) {
2980
2993
  editMethod({
2981
2994
  row: selected.row,
2982
- rowIndex: _this29.getRowIndex(selected.row),
2995
+ rowIndex: _this30.getRowIndex(selected.row),
2983
2996
  column: selected.column,
2984
- columnIndex: _this29.getColumnIndex(selected.column),
2985
- $table: _this29
2997
+ columnIndex: _this30.getColumnIndex(selected.column),
2998
+ $table: _this30
2986
2999
  });
2987
3000
  } else {
2988
3001
  setCellValue(selected.row, selected.column, null);
2989
- _this29.handleActived(selected.args, evnt);
3002
+ _this30.handleActived(selected.args, evnt);
2990
3003
  }
2991
3004
  }
2992
3005
  }
2993
3006
  }
2994
- _this29.emitEvent('keydown', {}, evnt);
3007
+ _this30.emitEvent('keydown', {}, evnt);
2995
3008
  });
2996
3009
  }
2997
3010
  },
@@ -3066,7 +3079,7 @@ var Methods = {
3066
3079
  }
3067
3080
  },
3068
3081
  handleTargetLeaveEvent: function handleTargetLeaveEvent() {
3069
- var _this30 = this;
3082
+ var _this31 = this;
3070
3083
  var tooltipOpts = this.tooltipOpts;
3071
3084
  var $tooltip = this.$refs.tooltip;
3072
3085
  if ($tooltip) {
@@ -3074,9 +3087,9 @@ var Methods = {
3074
3087
  }
3075
3088
  if (tooltipOpts.enterable) {
3076
3089
  this.tooltipTimeout = setTimeout(function () {
3077
- $tooltip = _this30.$refs.tooltip;
3090
+ $tooltip = _this31.$refs.tooltip;
3078
3091
  if ($tooltip && !$tooltip.isActived()) {
3079
- _this30.closeTooltip();
3092
+ _this31.closeTooltip();
3080
3093
  }
3081
3094
  }, tooltipOpts.leaveDelay);
3082
3095
  } else {
@@ -3254,13 +3267,13 @@ var Methods = {
3254
3267
  * 获取复选框半选状态的行数据
3255
3268
  */
3256
3269
  getCheckboxIndeterminateRecords: function getCheckboxIndeterminateRecords(isFull) {
3257
- var _this31 = this;
3270
+ var _this32 = this;
3258
3271
  var treeConfig = this.treeConfig,
3259
3272
  treeIndeterminates = this.treeIndeterminates,
3260
3273
  fullDataRowIdData = this.fullDataRowIdData;
3261
3274
  if (treeConfig) {
3262
3275
  return isFull ? treeIndeterminates.slice(0) : treeIndeterminates.filter(function (row) {
3263
- var rowid = (0, _util.getRowid)(_this31, row);
3276
+ var rowid = (0, _util.getRowid)(_this32, row);
3264
3277
  return fullDataRowIdData[rowid];
3265
3278
  });
3266
3279
  }
@@ -3287,12 +3300,12 @@ var Methods = {
3287
3300
  }
3288
3301
  },
3289
3302
  handleCheckedCheckboxRow: function handleCheckedCheckboxRow(rows, value, isForce) {
3290
- var _this32 = this;
3303
+ var _this33 = this;
3291
3304
  if (rows && !_xeUtils["default"].isArray(rows)) {
3292
3305
  rows = [rows];
3293
3306
  }
3294
3307
  rows.forEach(function (row) {
3295
- return _this32.handleSelectRow({
3308
+ return _this33.handleSelectRow({
3296
3309
  row: row
3297
3310
  }, !!value, isForce);
3298
3311
  });
@@ -3323,7 +3336,7 @@ var Methods = {
3323
3336
  * value 选中true 不选false 半选-1
3324
3337
  */
3325
3338
  handleSelectRow: function handleSelectRow(_ref6, value, isForce) {
3326
- var _this33 = this;
3339
+ var _this34 = this;
3327
3340
  var row = _ref6.row;
3328
3341
  var selection = this.selection,
3329
3342
  afterFullData = this.afterFullData,
@@ -3344,20 +3357,20 @@ var Methods = {
3344
3357
  } else {
3345
3358
  // 更新子节点状态
3346
3359
  _xeUtils["default"].eachTree([row], function (item) {
3347
- if (_this33.eqRow(item, row) || isForce || !checkMethod || checkMethod({
3360
+ if (_this34.eqRow(item, row) || isForce || !checkMethod || checkMethod({
3348
3361
  row: item
3349
3362
  })) {
3350
3363
  _xeUtils["default"].set(item, checkField, value);
3351
3364
  _xeUtils["default"].remove(treeIndeterminates, function (half) {
3352
- return _this33.eqRow(half, item);
3365
+ return _this34.eqRow(half, item);
3353
3366
  });
3354
- _this33.handleCheckboxReserveRow(row, value);
3367
+ _this34.handleCheckboxReserveRow(row, value);
3355
3368
  }
3356
3369
  }, treeOpts);
3357
3370
  }
3358
3371
  // 如果存在父节点,更新父节点状态
3359
3372
  var matchObj = _xeUtils["default"].findTree(afterFullData, function (item) {
3360
- return _this33.eqRow(item, row);
3373
+ return _this34.eqRow(item, row);
3361
3374
  }, treeOpts);
3362
3375
  if (matchObj && matchObj.parent) {
3363
3376
  var parentStatus;
@@ -3367,7 +3380,7 @@ var Methods = {
3367
3380
  });
3368
3381
  }) : matchObj.items;
3369
3382
  var indeterminatesItem = _xeUtils["default"].find(matchObj.items, function (item) {
3370
- return _this33.findRowIndexOf(treeIndeterminates, item) > -1;
3383
+ return _this34.findRowIndexOf(treeIndeterminates, item) > -1;
3371
3384
  });
3372
3385
  if (indeterminatesItem) {
3373
3386
  parentStatus = -1;
@@ -3376,7 +3389,7 @@ var Methods = {
3376
3389
  return _xeUtils["default"].get(item, checkField);
3377
3390
  });
3378
3391
  parentStatus = selectItems.filter(function (item) {
3379
- return _this33.findRowIndexOf(vItems, item) > -1;
3392
+ return _this34.findRowIndexOf(vItems, item) > -1;
3380
3393
  }).length === vItems.length ? true : selectItems.length || value === -1 ? -1 : false;
3381
3394
  }
3382
3395
  return this.handleSelectRow({
@@ -3398,31 +3411,31 @@ var Methods = {
3398
3411
  treeIndeterminates.push(row);
3399
3412
  }
3400
3413
  _xeUtils["default"].remove(selection, function (item) {
3401
- return _this33.eqRow(item, row);
3414
+ return _this34.eqRow(item, row);
3402
3415
  });
3403
3416
  } else {
3404
3417
  // 更新子节点状态
3405
3418
  _xeUtils["default"].eachTree([row], function (item) {
3406
- if (_this33.eqRow(item, row) || isForce || !checkMethod || checkMethod({
3419
+ if (_this34.eqRow(item, row) || isForce || !checkMethod || checkMethod({
3407
3420
  row: item
3408
3421
  })) {
3409
3422
  if (value) {
3410
3423
  selection.push(item);
3411
3424
  } else {
3412
3425
  _xeUtils["default"].remove(selection, function (select) {
3413
- return _this33.eqRow(select, item);
3426
+ return _this34.eqRow(select, item);
3414
3427
  });
3415
3428
  }
3416
3429
  _xeUtils["default"].remove(treeIndeterminates, function (half) {
3417
- return _this33.eqRow(half, item);
3430
+ return _this34.eqRow(half, item);
3418
3431
  });
3419
- _this33.handleCheckboxReserveRow(row, value);
3432
+ _this34.handleCheckboxReserveRow(row, value);
3420
3433
  }
3421
3434
  }, treeOpts);
3422
3435
  }
3423
3436
  // 如果存在父节点,更新父节点状态
3424
3437
  var _matchObj = _xeUtils["default"].findTree(afterFullData, function (item) {
3425
- return _this33.eqRow(item, row);
3438
+ return _this34.eqRow(item, row);
3426
3439
  }, treeOpts);
3427
3440
  if (_matchObj && _matchObj.parent) {
3428
3441
  var _parentStatus;
@@ -3432,16 +3445,16 @@ var Methods = {
3432
3445
  });
3433
3446
  }) : _matchObj.items;
3434
3447
  var _indeterminatesItem = _xeUtils["default"].find(_matchObj.items, function (item) {
3435
- return _this33.findRowIndexOf(treeIndeterminates, item) > -1;
3448
+ return _this34.findRowIndexOf(treeIndeterminates, item) > -1;
3436
3449
  });
3437
3450
  if (_indeterminatesItem) {
3438
3451
  _parentStatus = -1;
3439
3452
  } else {
3440
3453
  var _selectItems = _matchObj.items.filter(function (item) {
3441
- return _this33.findRowIndexOf(selection, item) > -1;
3454
+ return _this34.findRowIndexOf(selection, item) > -1;
3442
3455
  });
3443
3456
  _parentStatus = _selectItems.filter(function (item) {
3444
- return _this33.findRowIndexOf(_vItems, item) > -1;
3457
+ return _this34.findRowIndexOf(_vItems, item) > -1;
3445
3458
  }).length === _vItems.length ? true : _selectItems.length || value === -1 ? -1 : false;
3446
3459
  }
3447
3460
  return this.handleSelectRow({
@@ -3458,7 +3471,7 @@ var Methods = {
3458
3471
  }
3459
3472
  } else {
3460
3473
  _xeUtils["default"].remove(selection, function (item) {
3461
- return _this33.eqRow(item, row);
3474
+ return _this34.eqRow(item, row);
3462
3475
  });
3463
3476
  }
3464
3477
  this.handleCheckboxReserveRow(row, value);
@@ -3507,7 +3520,7 @@ var Methods = {
3507
3520
  return this.$nextTick();
3508
3521
  },
3509
3522
  handleCheckedAllCheckboxRow: function handleCheckedAllCheckboxRow(value, isForce) {
3510
- var _this34 = this;
3523
+ var _this35 = this;
3511
3524
  var afterFullData = this.afterFullData,
3512
3525
  treeConfig = this.treeConfig,
3513
3526
  treeOpts = this.treeOpts,
@@ -3520,7 +3533,7 @@ var Methods = {
3520
3533
  checkMethod = checkboxOpts.checkMethod;
3521
3534
  var selectRows = [];
3522
3535
  var beforeSelection = treeConfig ? [] : selection.filter(function (row) {
3523
- return _this34.findRowIndexOf(afterFullData, row) === -1;
3536
+ return _this35.findRowIndexOf(afterFullData, row) === -1;
3524
3537
  });
3525
3538
  if (checkStrictly) {
3526
3539
  this.isAllSelected = value;
@@ -3574,7 +3587,7 @@ var Methods = {
3574
3587
  _xeUtils["default"].eachTree(afterFullData, function (row) {
3575
3588
  if (checkMethod({
3576
3589
  row: row
3577
- }) ? 0 : _this34.findRowIndexOf(selection, row) > -1) {
3590
+ }) ? 0 : _this35.findRowIndexOf(selection, row) > -1) {
3578
3591
  selectRows.push(row);
3579
3592
  }
3580
3593
  }, treeOpts);
@@ -3589,7 +3602,7 @@ var Methods = {
3589
3602
  */
3590
3603
  if (!isForce && checkMethod) {
3591
3604
  selectRows = afterFullData.filter(function (row) {
3592
- return _this34.findRowIndexOf(selection, row) > -1 || checkMethod({
3605
+ return _this35.findRowIndexOf(selection, row) > -1 || checkMethod({
3593
3606
  row: row
3594
3607
  });
3595
3608
  });
@@ -3606,7 +3619,7 @@ var Methods = {
3606
3619
  selectRows = afterFullData.filter(function (row) {
3607
3620
  return checkMethod({
3608
3621
  row: row
3609
- }) ? 0 : _this34.findRowIndexOf(selection, row) > -1;
3622
+ }) ? 0 : _this35.findRowIndexOf(selection, row) > -1;
3610
3623
  });
3611
3624
  }
3612
3625
  }
@@ -3615,11 +3628,11 @@ var Methods = {
3615
3628
  if (reserve) {
3616
3629
  if (value) {
3617
3630
  selectRows.forEach(function (row) {
3618
- checkboxReserveRowMap[(0, _util.getRowid)(_this34, row)] = row;
3631
+ checkboxReserveRowMap[(0, _util.getRowid)(_this35, row)] = row;
3619
3632
  });
3620
3633
  } else {
3621
3634
  afterFullData.forEach(function (row) {
3622
- return _this34.handleCheckboxReserveRow(row, false);
3635
+ return _this35.handleCheckboxReserveRow(row, false);
3623
3636
  });
3624
3637
  }
3625
3638
  }
@@ -3637,7 +3650,7 @@ var Methods = {
3637
3650
  return this.handleCheckedAllCheckboxRow(value, true);
3638
3651
  },
3639
3652
  checkSelectionStatus: function checkSelectionStatus() {
3640
- var _this35 = this;
3653
+ var _this36 = this;
3641
3654
  var afterFullData = this.afterFullData,
3642
3655
  selection = this.selection,
3643
3656
  treeIndeterminates = this.treeIndeterminates,
@@ -3673,11 +3686,11 @@ var Methods = {
3673
3686
  if (treeConfig) {
3674
3687
  if (halfField) {
3675
3688
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
3676
- return _xeUtils["default"].get(row, checkField) || _xeUtils["default"].get(row, halfField) || _this35.findRowIndexOf(treeIndeterminates, row) > -1;
3689
+ return _xeUtils["default"].get(row, checkField) || _xeUtils["default"].get(row, halfField) || _this36.findRowIndexOf(treeIndeterminates, row) > -1;
3677
3690
  });
3678
3691
  } else {
3679
3692
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
3680
- return _xeUtils["default"].get(row, checkField) || _this35.findRowIndexOf(treeIndeterminates, row) > -1;
3693
+ return _xeUtils["default"].get(row, checkField) || _this36.findRowIndexOf(treeIndeterminates, row) > -1;
3681
3694
  });
3682
3695
  }
3683
3696
  } else {
@@ -3699,22 +3712,22 @@ var Methods = {
3699
3712
  disableRows.push(row);
3700
3713
  return true;
3701
3714
  }
3702
- if (_this35.findRowIndexOf(selection, row) > -1) {
3715
+ if (_this36.findRowIndexOf(selection, row) > -1) {
3703
3716
  checkRows.push(row);
3704
3717
  return true;
3705
3718
  }
3706
3719
  return false;
3707
3720
  } : function (row) {
3708
- return _this35.findRowIndexOf(selection, row) > -1;
3721
+ return _this36.findRowIndexOf(selection, row) > -1;
3709
3722
  });
3710
3723
  isAllSelected = isAllResolve && afterFullData.length !== disableRows.length;
3711
3724
  if (treeConfig) {
3712
3725
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
3713
- return _this35.findRowIndexOf(treeIndeterminates, row) > -1 || _this35.findRowIndexOf(selection, row) > -1;
3726
+ return _this36.findRowIndexOf(treeIndeterminates, row) > -1 || _this36.findRowIndexOf(selection, row) > -1;
3714
3727
  });
3715
3728
  } else {
3716
3729
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
3717
- return _this35.findRowIndexOf(selection, row) > -1;
3730
+ return _this36.findRowIndexOf(selection, row) > -1;
3718
3731
  });
3719
3732
  }
3720
3733
  }
@@ -3820,7 +3833,7 @@ var Methods = {
3820
3833
  * 获取复选框保留选中的行
3821
3834
  */
3822
3835
  getCheckboxReserveRecords: function getCheckboxReserveRecords(isFull) {
3823
- var _this36 = this;
3836
+ var _this37 = this;
3824
3837
  var fullDataRowIdData = this.fullDataRowIdData,
3825
3838
  afterFullData = this.afterFullData,
3826
3839
  checkboxReserveRowMap = this.checkboxReserveRowMap,
@@ -3832,11 +3845,11 @@ var Methods = {
3832
3845
  var afterFullIdMaps = {};
3833
3846
  if (treeConfig) {
3834
3847
  _xeUtils["default"].eachTree(afterFullData, function (row) {
3835
- afterFullIdMaps[(0, _util.getRowid)(_this36, row)] = 1;
3848
+ afterFullIdMaps[(0, _util.getRowid)(_this37, row)] = 1;
3836
3849
  }, treeOpts);
3837
3850
  } else {
3838
3851
  afterFullData.forEach(function (row) {
3839
- afterFullIdMaps[(0, _util.getRowid)(_this36, row)] = 1;
3852
+ afterFullIdMaps[(0, _util.getRowid)(_this37, row)] = 1;
3840
3853
  });
3841
3854
  }
3842
3855
  _xeUtils["default"].each(checkboxReserveRowMap, function (oldRow, oldRowid) {
@@ -3895,7 +3908,7 @@ var Methods = {
3895
3908
  * 清空行为不管是否被禁用还是保留记录,都将彻底清空选中状态
3896
3909
  */
3897
3910
  clearCheckboxRow: function clearCheckboxRow() {
3898
- var _this37 = this;
3911
+ var _this38 = this;
3899
3912
  var tableFullData = this.tableFullData,
3900
3913
  treeConfig = this.treeConfig,
3901
3914
  treeOpts = this.treeOpts,
@@ -3915,7 +3928,7 @@ var Methods = {
3915
3928
  }
3916
3929
  if (reserve) {
3917
3930
  tableFullData.forEach(function (row) {
3918
- return _this37.handleCheckboxReserveRow(row, false);
3931
+ return _this38.handleCheckboxReserveRow(row, false);
3919
3932
  });
3920
3933
  }
3921
3934
  this.isAllSelected = false;
@@ -4167,12 +4180,12 @@ var Methods = {
4167
4180
  * 如果存在规则,则校验
4168
4181
  */
4169
4182
  handleChangeCell: function handleChangeCell(evnt, params) {
4170
- var _this38 = this;
4183
+ var _this39 = this;
4171
4184
  this.checkValidate('blur')["catch"](function (e) {
4172
4185
  return e;
4173
4186
  }).then(function () {
4174
- _this38.handleActived(params, evnt).then(function () {
4175
- return _this38.checkValidate('change');
4187
+ _this39.handleActived(params, evnt).then(function () {
4188
+ return _this39.checkValidate('change');
4176
4189
  })["catch"](function (e) {
4177
4190
  return e;
4178
4191
  });
@@ -4266,7 +4279,7 @@ var Methods = {
4266
4279
  * 如果是双击模式,则激活为编辑状态
4267
4280
  */
4268
4281
  triggerCellDblclickEvent: function triggerCellDblclickEvent(evnt, params) {
4269
- var _this39 = this;
4282
+ var _this40 = this;
4270
4283
  var editStore = this.editStore,
4271
4284
  editConfig = this.editConfig,
4272
4285
  editOpts = this.editOpts;
@@ -4279,15 +4292,15 @@ var Methods = {
4279
4292
  this.checkValidate('blur')["catch"](function (e) {
4280
4293
  return e;
4281
4294
  }).then(function () {
4282
- _this39.handleActived(params, evnt).then(function () {
4283
- return _this39.checkValidate('change');
4295
+ _this40.handleActived(params, evnt).then(function () {
4296
+ return _this40.checkValidate('change');
4284
4297
  })["catch"](function (e) {
4285
4298
  return e;
4286
4299
  });
4287
4300
  });
4288
4301
  } else if (editOpts.mode === 'cell') {
4289
4302
  this.handleActived(params, evnt).then(function () {
4290
- return _this39.checkValidate('change');
4303
+ return _this40.checkValidate('change');
4291
4304
  })["catch"](function (e) {
4292
4305
  return e;
4293
4306
  });
@@ -4297,7 +4310,7 @@ var Methods = {
4297
4310
  this.emitEvent('cell-dblclick', params, evnt);
4298
4311
  },
4299
4312
  handleDefaultSort: function handleDefaultSort() {
4300
- var _this40 = this;
4313
+ var _this41 = this;
4301
4314
  var sortConfig = this.sortConfig,
4302
4315
  sortOpts = this.sortOpts;
4303
4316
  var defaultSort = sortOpts.defaultSort;
@@ -4310,7 +4323,7 @@ var Methods = {
4310
4323
  var field = item.field,
4311
4324
  order = item.order;
4312
4325
  if (field && order) {
4313
- var column = _this40.getColumnByField(field);
4326
+ var column = _this41.getColumnByField(field);
4314
4327
  if (column && column.sortable) {
4315
4328
  column.order = order;
4316
4329
  column.sortTime = Date.now() + index;
@@ -4351,7 +4364,7 @@ var Methods = {
4351
4364
  }
4352
4365
  },
4353
4366
  sort: function sort(sortConfs, sortOrder) {
4354
- var _this41 = this;
4367
+ var _this42 = this;
4355
4368
  var sortOpts = this.sortOpts;
4356
4369
  var multiple = sortOpts.multiple,
4357
4370
  remote = sortOpts.remote,
@@ -4377,14 +4390,14 @@ var Methods = {
4377
4390
  order = confs.order;
4378
4391
  var column = field;
4379
4392
  if (_xeUtils["default"].isString(field)) {
4380
- column = _this41.getColumnByField(field);
4393
+ column = _this42.getColumnByField(field);
4381
4394
  }
4382
4395
  if (column && (column.sortable || column.remoteSort)) {
4383
4396
  if (!firstSortColumn) {
4384
4397
  firstSortColumn = column;
4385
4398
  }
4386
4399
  if (orders.indexOf(order) === -1) {
4387
- order = getNextSortOrder(_this41, column);
4400
+ order = getNextSortOrder(_this42, column);
4388
4401
  }
4389
4402
  if (column.order !== order) {
4390
4403
  column.order = order;
@@ -4506,7 +4519,7 @@ var Methods = {
4506
4519
  return rest && rest.expandLoaded;
4507
4520
  },
4508
4521
  clearRowExpandLoaded: function clearRowExpandLoaded(row) {
4509
- var _this42 = this;
4522
+ var _this43 = this;
4510
4523
  var expandOpts = this.expandOpts,
4511
4524
  expandLazyLoadeds = this.expandLazyLoadeds,
4512
4525
  fullAllDataRowMap = this.fullAllDataRowMap;
@@ -4515,7 +4528,7 @@ var Methods = {
4515
4528
  if (lazy && rest) {
4516
4529
  rest.expandLoaded = false;
4517
4530
  _xeUtils["default"].remove(expandLazyLoadeds, function (item) {
4518
- return _this42.eqRow(item, row);
4531
+ return _this43.eqRow(item, row);
4519
4532
  });
4520
4533
  }
4521
4534
  return this.$nextTick();
@@ -4525,13 +4538,13 @@ var Methods = {
4525
4538
  * @param {Row} row 行对象
4526
4539
  */
4527
4540
  reloadRowExpand: function reloadRowExpand(row) {
4528
- var _this43 = this;
4541
+ var _this44 = this;
4529
4542
  var expandOpts = this.expandOpts,
4530
4543
  expandLazyLoadeds = this.expandLazyLoadeds;
4531
4544
  var lazy = expandOpts.lazy;
4532
4545
  if (lazy && this.findRowIndexOf(expandLazyLoadeds, row) === -1) {
4533
4546
  this.clearRowExpandLoaded(row).then(function () {
4534
- return _this43.handleAsyncRowExpand(row);
4547
+ return _this44.handleAsyncRowExpand(row);
4535
4548
  });
4536
4549
  }
4537
4550
  return this.$nextTick();
@@ -4602,25 +4615,25 @@ var Methods = {
4602
4615
  return this.setRowExpand(this.expandOpts.lazy ? this.tableData : this.tableFullData, expanded);
4603
4616
  },
4604
4617
  handleAsyncRowExpand: function handleAsyncRowExpand(row) {
4605
- var _this44 = this;
4618
+ var _this45 = this;
4606
4619
  var rest = this.fullAllDataRowMap.get(row);
4607
4620
  return new Promise(function (resolve) {
4608
- _this44.expandLazyLoadeds.push(row);
4609
- _this44.expandOpts.loadMethod({
4610
- $table: _this44,
4621
+ _this45.expandLazyLoadeds.push(row);
4622
+ _this45.expandOpts.loadMethod({
4623
+ $table: _this45,
4611
4624
  row: row,
4612
- rowIndex: _this44.getRowIndex(row),
4613
- $rowIndex: _this44.getVMRowIndex(row)
4625
+ rowIndex: _this45.getRowIndex(row),
4626
+ $rowIndex: _this45.getVMRowIndex(row)
4614
4627
  }).then(function () {
4615
4628
  rest.expandLoaded = true;
4616
- _this44.rowExpandeds.push(row);
4629
+ _this45.rowExpandeds.push(row);
4617
4630
  })["catch"](function () {
4618
4631
  rest.expandLoaded = false;
4619
4632
  })["finally"](function () {
4620
- _xeUtils["default"].remove(_this44.expandLazyLoadeds, function (item) {
4621
- return _this44.eqRow(item, row);
4633
+ _xeUtils["default"].remove(_this45.expandLazyLoadeds, function (item) {
4634
+ return _this45.eqRow(item, row);
4622
4635
  });
4623
- resolve(_this44.$nextTick().then(_this44.recalculate));
4636
+ resolve(_this45.$nextTick().then(_this45.recalculate));
4624
4637
  });
4625
4638
  });
4626
4639
  },
@@ -4632,7 +4645,7 @@ var Methods = {
4632
4645
  * @param {Boolean} expanded 是否展开
4633
4646
  */
4634
4647
  setRowExpand: function setRowExpand(rows, expanded) {
4635
- var _this45 = this;
4648
+ var _this46 = this;
4636
4649
  var fullAllDataRowMap = this.fullAllDataRowMap,
4637
4650
  expandLazyLoadeds = this.expandLazyLoadeds,
4638
4651
  expandOpts = this.expandOpts,
@@ -4661,17 +4674,17 @@ var Methods = {
4661
4674
  columnIndex: columnIndex,
4662
4675
  $columnIndex: $columnIndex,
4663
4676
  row: row,
4664
- rowIndex: _this45.getRowIndex(row),
4665
- $rowIndex: _this45.getVMRowIndex(row)
4677
+ rowIndex: _this46.getRowIndex(row),
4678
+ $rowIndex: _this46.getVMRowIndex(row)
4666
4679
  });
4667
4680
  }) : rows;
4668
4681
  if (expanded) {
4669
4682
  validRows.forEach(function (row) {
4670
- if (_this45.findRowIndexOf(rowExpandeds, row) === -1) {
4683
+ if (_this46.findRowIndexOf(rowExpandeds, row) === -1) {
4671
4684
  var rest = fullAllDataRowMap.get(row);
4672
- var isLoad = lazy && !rest.expandLoaded && _this45.findRowIndexOf(expandLazyLoadeds, row) === -1;
4685
+ var isLoad = lazy && !rest.expandLoaded && _this46.findRowIndexOf(expandLazyLoadeds, row) === -1;
4673
4686
  if (isLoad) {
4674
- lazyRests.push(_this45.handleAsyncRowExpand(row));
4687
+ lazyRests.push(_this46.handleAsyncRowExpand(row));
4675
4688
  } else {
4676
4689
  rowExpandeds.push(row);
4677
4690
  }
@@ -4679,12 +4692,12 @@ var Methods = {
4679
4692
  });
4680
4693
  } else {
4681
4694
  _xeUtils["default"].remove(rowExpandeds, function (row) {
4682
- return _this45.findRowIndexOf(validRows, row) > -1;
4695
+ return _this46.findRowIndexOf(validRows, row) > -1;
4683
4696
  });
4684
4697
  }
4685
4698
  if (reserve) {
4686
4699
  validRows.forEach(function (row) {
4687
- return _this45.handleRowExpandReserve(row, expanded);
4700
+ return _this46.handleRowExpandReserve(row, expanded);
4688
4701
  });
4689
4702
  }
4690
4703
  }
@@ -4703,7 +4716,7 @@ var Methods = {
4703
4716
  * 手动清空展开行状态,数据会恢复成未展开的状态
4704
4717
  */
4705
4718
  clearRowExpand: function clearRowExpand() {
4706
- var _this46 = this;
4719
+ var _this47 = this;
4707
4720
  var expandOpts = this.expandOpts,
4708
4721
  rowExpandeds = this.rowExpandeds,
4709
4722
  tableFullData = this.tableFullData;
@@ -4712,12 +4725,12 @@ var Methods = {
4712
4725
  this.rowExpandeds = [];
4713
4726
  if (reserve) {
4714
4727
  tableFullData.forEach(function (row) {
4715
- return _this46.handleRowExpandReserve(row, false);
4728
+ return _this47.handleRowExpandReserve(row, false);
4716
4729
  });
4717
4730
  }
4718
4731
  return this.$nextTick().then(function () {
4719
4732
  if (isExists) {
4720
- _this46.recalculate();
4733
+ _this47.recalculate();
4721
4734
  }
4722
4735
  });
4723
4736
  },
@@ -4787,7 +4800,7 @@ var Methods = {
4787
4800
  * @param {Row} row 行对象
4788
4801
  */
4789
4802
  reloadTreeExpand: function reloadTreeExpand(row) {
4790
- var _this47 = this;
4803
+ var _this48 = this;
4791
4804
  var treeOpts = this.treeOpts,
4792
4805
  treeLazyLoadeds = this.treeLazyLoadeds;
4793
4806
  var transform = treeOpts.transform,
@@ -4795,14 +4808,14 @@ var Methods = {
4795
4808
  hasChild = treeOpts.hasChild;
4796
4809
  if (lazy && row[hasChild] && treeLazyLoadeds.indexOf(row) === -1) {
4797
4810
  this.clearTreeExpandLoaded(row).then(function () {
4798
- return _this47.handleAsyncTreeExpandChilds(row);
4811
+ return _this48.handleAsyncTreeExpandChilds(row);
4799
4812
  }).then(function () {
4800
4813
  if (transform) {
4801
- _this47.handleVirtualTreeToList();
4802
- return _this47.handleTableData();
4814
+ _this48.handleVirtualTreeToList();
4815
+ return _this48.handleTableData();
4803
4816
  }
4804
4817
  }).then(function () {
4805
- return _this47.recalculate();
4818
+ return _this48.recalculate();
4806
4819
  });
4807
4820
  }
4808
4821
  return this.$nextTick();
@@ -4871,7 +4884,7 @@ var Methods = {
4871
4884
  }
4872
4885
  },
4873
4886
  handleAsyncTreeExpandChilds: function handleAsyncTreeExpandChilds(row) {
4874
- var _this48 = this;
4887
+ var _this49 = this;
4875
4888
  var fullAllDataRowMap = this.fullAllDataRowMap,
4876
4889
  treeExpandeds = this.treeExpandeds,
4877
4890
  treeOpts = this.treeOpts,
@@ -4884,7 +4897,7 @@ var Methods = {
4884
4897
  return new Promise(function (resolve) {
4885
4898
  treeLazyLoadeds.push(row);
4886
4899
  loadMethod({
4887
- $table: _this48,
4900
+ $table: _this49,
4888
4901
  row: row
4889
4902
  }).then(function (childRecords) {
4890
4903
  // 响应成功后则展开行,并将子节点挂载到该节点下
@@ -4896,17 +4909,17 @@ var Methods = {
4896
4909
  childRecords = [];
4897
4910
  }
4898
4911
  if (childRecords) {
4899
- return _this48.loadTreeChildren(row, childRecords).then(function (childRows) {
4912
+ return _this49.loadTreeChildren(row, childRecords).then(function (childRows) {
4900
4913
  if (childRows.length && treeExpandeds.indexOf(row) === -1) {
4901
4914
  treeExpandeds.push(row);
4902
4915
  }
4903
4916
  // 如果当前节点已选中,则展开后子节点也被选中
4904
- if (!checkStrictly && _this48.isCheckedByCheckboxRow(row)) {
4905
- _this48.handleCheckedCheckboxRow(childRows, true, true);
4917
+ if (!checkStrictly && _this49.isCheckedByCheckboxRow(row)) {
4918
+ _this49.handleCheckedCheckboxRow(childRows, true, true);
4906
4919
  }
4907
- return _this48.$nextTick().then(function () {
4920
+ return _this49.$nextTick().then(function () {
4908
4921
  if (transform) {
4909
- return _this48.handleTableData();
4922
+ return _this49.handleTableData();
4910
4923
  }
4911
4924
  });
4912
4925
  });
@@ -4918,8 +4931,8 @@ var Methods = {
4918
4931
  return item === row;
4919
4932
  });
4920
4933
  })["finally"](function () {
4921
- _this48.$nextTick().then(function () {
4922
- return _this48.recalculate();
4934
+ _this49.$nextTick().then(function () {
4935
+ return _this49.recalculate();
4923
4936
  }).then(function () {
4924
4937
  return resolve();
4925
4938
  });
@@ -4951,7 +4964,7 @@ var Methods = {
4951
4964
  * @returns
4952
4965
  */
4953
4966
  handleBaseTreeExpand: function handleBaseTreeExpand(rows, expanded) {
4954
- var _this49 = this;
4967
+ var _this50 = this;
4955
4968
  var fullAllDataRowMap = this.fullAllDataRowMap,
4956
4969
  tableFullData = this.tableFullData,
4957
4970
  treeExpandeds = this.treeExpandeds,
@@ -4995,7 +5008,7 @@ var Methods = {
4995
5008
  var isLoad = lazy && row[hasChild] && !rest.treeLoaded && treeLazyLoadeds.indexOf(row) === -1;
4996
5009
  // 是否使用懒加载
4997
5010
  if (isLoad) {
4998
- result.push(_this49.handleAsyncTreeExpandChilds(row));
5011
+ result.push(_this50.handleAsyncTreeExpandChilds(row));
4999
5012
  } else {
5000
5013
  if (row[children] && row[children].length) {
5001
5014
  treeExpandeds.push(row);
@@ -5010,7 +5023,7 @@ var Methods = {
5010
5023
  }
5011
5024
  if (reserve) {
5012
5025
  validRows.forEach(function (row) {
5013
- return _this49.handleTreeExpandReserve(row, expanded);
5026
+ return _this50.handleTreeExpandReserve(row, expanded);
5014
5027
  });
5015
5028
  }
5016
5029
  return Promise.all(result).then(this.recalculate);
@@ -5022,12 +5035,12 @@ var Methods = {
5022
5035
  * @returns
5023
5036
  */
5024
5037
  handleVirtualTreeExpand: function handleVirtualTreeExpand(rows, expanded) {
5025
- var _this50 = this;
5038
+ var _this51 = this;
5026
5039
  return this.handleBaseTreeExpand(rows, expanded).then(function () {
5027
- _this50.handleVirtualTreeToList();
5028
- return _this50.handleTableData();
5040
+ _this51.handleVirtualTreeToList();
5041
+ return _this51.handleTableData();
5029
5042
  }).then(function () {
5030
- return _this50.recalculate();
5043
+ return _this51.recalculate();
5031
5044
  });
5032
5045
  },
5033
5046
  /**
@@ -5066,7 +5079,7 @@ var Methods = {
5066
5079
  * 手动清空树形节点的展开状态,数据会恢复成未展开的状态
5067
5080
  */
5068
5081
  clearTreeExpand: function clearTreeExpand() {
5069
- var _this51 = this;
5082
+ var _this52 = this;
5070
5083
  var treeOpts = this.treeOpts,
5071
5084
  treeExpandeds = this.treeExpandeds,
5072
5085
  tableFullData = this.tableFullData;
@@ -5076,17 +5089,17 @@ var Methods = {
5076
5089
  this.treeExpandeds = [];
5077
5090
  if (reserve) {
5078
5091
  _xeUtils["default"].eachTree(tableFullData, function (row) {
5079
- return _this51.handleTreeExpandReserve(row, false);
5092
+ return _this52.handleTreeExpandReserve(row, false);
5080
5093
  }, treeOpts);
5081
5094
  }
5082
5095
  return this.handleTableData().then(function () {
5083
5096
  if (transform) {
5084
- _this51.handleVirtualTreeToList();
5085
- return _this51.handleTableData();
5097
+ _this52.handleVirtualTreeToList();
5098
+ return _this52.handleTableData();
5086
5099
  }
5087
5100
  }).then(function () {
5088
5101
  if (isExists) {
5089
- _this51.recalculate();
5102
+ _this52.recalculate();
5090
5103
  }
5091
5104
  });
5092
5105
  },
@@ -5205,28 +5218,28 @@ var Methods = {
5205
5218
  },
5206
5219
  // 计算可视渲染相关数据
5207
5220
  computeScrollLoad: function computeScrollLoad() {
5208
- var _this52 = this;
5221
+ var _this53 = this;
5209
5222
  return this.$nextTick().then(function () {
5210
- var sYOpts = _this52.sYOpts,
5211
- sXOpts = _this52.sXOpts,
5212
- scrollXLoad = _this52.scrollXLoad,
5213
- scrollYLoad = _this52.scrollYLoad,
5214
- scrollXStore = _this52.scrollXStore,
5215
- scrollYStore = _this52.scrollYStore;
5223
+ var sYOpts = _this53.sYOpts,
5224
+ sXOpts = _this53.sXOpts,
5225
+ scrollXLoad = _this53.scrollXLoad,
5226
+ scrollYLoad = _this53.scrollYLoad,
5227
+ scrollXStore = _this53.scrollXStore,
5228
+ scrollYStore = _this53.scrollYStore;
5216
5229
  // 计算 X 逻辑
5217
5230
  if (scrollXLoad) {
5218
- var _computeVirtualX3 = computeVirtualX(_this52),
5231
+ var _computeVirtualX3 = computeVirtualX(_this53),
5219
5232
  visibleXSize = _computeVirtualX3.visibleSize;
5220
5233
  var offsetXSize = sXOpts.oSize ? _xeUtils["default"].toNumber(sXOpts.oSize) : _dom.browse.msie ? 10 : _dom.browse.edge ? 5 : 0;
5221
5234
  scrollXStore.offsetSize = offsetXSize;
5222
5235
  scrollXStore.visibleSize = visibleXSize;
5223
5236
  scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
5224
- _this52.updateScrollXData();
5237
+ _this53.updateScrollXData();
5225
5238
  } else {
5226
- _this52.updateScrollXSpace();
5239
+ _this53.updateScrollXSpace();
5227
5240
  }
5228
5241
  // 计算 Y 逻辑
5229
- var _computeVirtualY = computeVirtualY(_this52),
5242
+ var _computeVirtualY = computeVirtualY(_this53),
5230
5243
  rowHeight = _computeVirtualY.rowHeight,
5231
5244
  visibleYSize = _computeVirtualY.visibleSize;
5232
5245
  scrollYStore.rowHeight = rowHeight;
@@ -5235,12 +5248,12 @@ var Methods = {
5235
5248
  scrollYStore.offsetSize = offsetYSize;
5236
5249
  scrollYStore.visibleSize = visibleYSize;
5237
5250
  scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
5238
- _this52.updateScrollYData();
5251
+ _this53.updateScrollYData();
5239
5252
  } else {
5240
- _this52.updateScrollYSpace();
5253
+ _this53.updateScrollYSpace();
5241
5254
  }
5242
- _this52.rowHeight = rowHeight;
5243
- _this52.$nextTick(_this52.updateStyle);
5255
+ _this53.rowHeight = rowHeight;
5256
+ _this53.$nextTick(_this53.updateStyle);
5244
5257
  });
5245
5258
  },
5246
5259
  handleTableColumn: function handleTableColumn() {
@@ -5250,11 +5263,11 @@ var Methods = {
5250
5263
  this.tableColumn = scrollXLoad ? visibleColumn.slice(scrollXStore.startIndex, scrollXStore.endIndex) : visibleColumn.slice(0);
5251
5264
  },
5252
5265
  updateScrollXData: function updateScrollXData() {
5253
- var _this53 = this;
5266
+ var _this54 = this;
5254
5267
  // this.tableColumn = []
5255
5268
  this.$nextTick(function () {
5256
- _this53.handleTableColumn();
5257
- _this53.updateScrollXSpace();
5269
+ _this54.handleTableColumn();
5270
+ _this54.updateScrollXSpace();
5258
5271
  });
5259
5272
  },
5260
5273
  // 更新横向 X 可视渲染上下剩余空间大小
@@ -5305,11 +5318,11 @@ var Methods = {
5305
5318
  }
5306
5319
  },
5307
5320
  updateScrollYData: function updateScrollYData() {
5308
- var _this54 = this;
5321
+ var _this55 = this;
5309
5322
  // this.tableData = []
5310
5323
  this.$nextTick(function () {
5311
- _this54.handleTableData();
5312
- _this54.updateScrollYSpace();
5324
+ _this55.handleTableData();
5325
+ _this55.updateScrollYSpace();
5313
5326
  });
5314
5327
  },
5315
5328
  // 更新纵向 Y 可视渲染上下剩余空间大小
@@ -5350,7 +5363,7 @@ var Methods = {
5350
5363
  * @param {Number} scrollTop 上距离
5351
5364
  */
5352
5365
  scrollTo: function scrollTo(scrollLeft, scrollTop) {
5353
- var _this55 = this;
5366
+ var _this56 = this;
5354
5367
  var $refs = this.$refs;
5355
5368
  var tableBody = $refs.tableBody,
5356
5369
  rightBody = $refs.rightBody,
@@ -5367,7 +5380,7 @@ var Methods = {
5367
5380
  if (this.scrollXLoad || this.scrollYLoad) {
5368
5381
  return new Promise(function (resolve) {
5369
5382
  return setTimeout(function () {
5370
- return resolve(_this55.$nextTick());
5383
+ return resolve(_this56.$nextTick());
5371
5384
  }, 50);
5372
5385
  });
5373
5386
  }
@@ -5409,7 +5422,7 @@ var Methods = {
5409
5422
  * @param {Row} row 行对象
5410
5423
  */
5411
5424
  scrollToTreeRow: function scrollToTreeRow(row) {
5412
- var _this56 = this;
5425
+ var _this57 = this;
5413
5426
  var tableFullData = this.tableFullData,
5414
5427
  treeConfig = this.treeConfig,
5415
5428
  treeOpts = this.treeOpts;
@@ -5421,14 +5434,14 @@ var Methods = {
5421
5434
  if (matchObj) {
5422
5435
  var nodes = matchObj.nodes;
5423
5436
  nodes.forEach(function (row, index) {
5424
- if (index < nodes.length - 1 && !_this56.isTreeExpandByRow(row)) {
5425
- rests.push(_this56.setTreeExpand(row, true));
5437
+ if (index < nodes.length - 1 && !_this57.isTreeExpandByRow(row)) {
5438
+ rests.push(_this57.setTreeExpand(row, true));
5426
5439
  }
5427
5440
  });
5428
5441
  }
5429
5442
  }
5430
5443
  return Promise.all(rests).then(function () {
5431
- return (0, _util.rowToVisible)(_this56, row);
5444
+ return (0, _util.rowToVisible)(_this57, row);
5432
5445
  });
5433
5446
  },
5434
5447
  /**
@@ -5483,30 +5496,30 @@ var Methods = {
5483
5496
  * 如果单元格配置了校验规则,则会进行校验
5484
5497
  */
5485
5498
  updateStatus: function updateStatus(scope, cellValue) {
5486
- var _this57 = this;
5499
+ var _this58 = this;
5487
5500
  var customVal = !_xeUtils["default"].isUndefined(cellValue);
5488
5501
  return this.$nextTick().then(function () {
5489
- var $refs = _this57.$refs,
5490
- editRules = _this57.editRules,
5491
- validStore = _this57.validStore;
5502
+ var $refs = _this58.$refs,
5503
+ editRules = _this58.editRules,
5504
+ validStore = _this58.validStore;
5492
5505
  if (scope && $refs.tableBody && editRules) {
5493
5506
  var row = scope.row,
5494
5507
  column = scope.column;
5495
5508
  var type = 'change';
5496
- if (_this57.hasCellRules(type, row, column)) {
5497
- var cell = _this57.getCell(row, column);
5509
+ if (_this58.hasCellRules(type, row, column)) {
5510
+ var cell = _this58.getCell(row, column);
5498
5511
  if (cell) {
5499
- return _this57.validCellRules(type, row, column, cellValue).then(function () {
5512
+ return _this58.validCellRules(type, row, column, cellValue).then(function () {
5500
5513
  if (customVal && validStore.visible) {
5501
5514
  setCellValue(row, column, cellValue);
5502
5515
  }
5503
- _this57.clearValidate();
5516
+ _this58.clearValidate();
5504
5517
  })["catch"](function (_ref8) {
5505
5518
  var rule = _ref8.rule;
5506
5519
  if (customVal) {
5507
5520
  setCellValue(row, column, cellValue);
5508
5521
  }
5509
- _this57.showValidTooltip({
5522
+ _this58.showValidTooltip({
5510
5523
  rule: rule,
5511
5524
  row: row,
5512
5525
  column: column,
@@ -5526,13 +5539,13 @@ var Methods = {
5526
5539
  * @param {TableMergeConfig[]} merges { row: Row|number, column: ColumnInfo|number, rowspan: number, colspan: number }
5527
5540
  */
5528
5541
  setMergeCells: function setMergeCells(merges) {
5529
- var _this58 = this;
5542
+ var _this59 = this;
5530
5543
  if (this.spanMethod) {
5531
5544
  (0, _log.errLog)('vxe.error.errConflicts', ['merge-cells', 'span-method']);
5532
5545
  }
5533
5546
  setMerges(this, merges, this.mergeList, this.afterFullData);
5534
5547
  return this.$nextTick().then(function () {
5535
- return _this58.updateCellAreas();
5548
+ return _this59.updateCellAreas();
5536
5549
  });
5537
5550
  },
5538
5551
  /**
@@ -5540,13 +5553,13 @@ var Methods = {
5540
5553
  * @param {TableMergeConfig[]} merges 多个或数组 [{row:Row|number, col:ColumnInfo|number}]
5541
5554
  */
5542
5555
  removeMergeCells: function removeMergeCells(merges) {
5543
- var _this59 = this;
5556
+ var _this60 = this;
5544
5557
  if (this.spanMethod) {
5545
5558
  (0, _log.errLog)('vxe.error.errConflicts', ['merge-cells', 'span-method']);
5546
5559
  }
5547
5560
  var rest = removeMerges(this, merges, this.mergeList, this.afterFullData);
5548
5561
  return this.$nextTick().then(function () {
5549
- _this59.updateCellAreas();
5562
+ _this60.updateCellAreas();
5550
5563
  return rest;
5551
5564
  });
5552
5565
  },
@@ -5567,23 +5580,23 @@ var Methods = {
5567
5580
  this.setMergeFooterItems(this.mergeFooterItems);
5568
5581
  },
5569
5582
  setMergeFooterItems: function setMergeFooterItems(merges) {
5570
- var _this60 = this;
5583
+ var _this61 = this;
5571
5584
  if (this.footerSpanMethod) {
5572
5585
  (0, _log.errLog)('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
5573
5586
  }
5574
5587
  setMerges(this, merges, this.mergeFooterList, null);
5575
5588
  return this.$nextTick().then(function () {
5576
- return _this60.updateCellAreas();
5589
+ return _this61.updateCellAreas();
5577
5590
  });
5578
5591
  },
5579
5592
  removeMergeFooterItems: function removeMergeFooterItems(merges) {
5580
- var _this61 = this;
5593
+ var _this62 = this;
5581
5594
  if (this.footerSpanMethod) {
5582
5595
  (0, _log.errLog)('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
5583
5596
  }
5584
5597
  var rest = removeMerges(this, merges, this.mergeFooterList, null);
5585
5598
  return this.$nextTick().then(function () {
5586
- _this61.updateCellAreas();
5599
+ _this62.updateCellAreas();
5587
5600
  return rest;
5588
5601
  });
5589
5602
  },
@@ -5700,9 +5713,9 @@ var Methods = {
5700
5713
  return cellLabel;
5701
5714
  },
5702
5715
  findRowIndexOf: function findRowIndexOf(list, row) {
5703
- var _this62 = this;
5716
+ var _this63 = this;
5704
5717
  return row ? _xeUtils["default"].findIndexOf(list, function (item) {
5705
- return _this62.eqRow(item, row);
5718
+ return _this63.eqRow(item, row);
5706
5719
  }) : -1;
5707
5720
  },
5708
5721
  eqRow: function eqRow(row1, row2) {