vxe-table 3.6.14-beta.1 → 3.6.14-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -787,7 +787,9 @@ var Methods = {
787
787
  var tableFullColumn = this.tableFullColumn,
788
788
  collectColumn = this.collectColumn,
789
789
  fullColumnMap = this.fullColumnMap,
790
- showOverflow = this.showOverflow;
790
+ showOverflow = this.showOverflow,
791
+ columnOpts = this.columnOpts,
792
+ rowOpts = this.rowOpts;
791
793
  var fullColumnIdData = this.fullColumnIdData = {};
792
794
  var fullColumnFieldData = this.fullColumnFieldData = {};
793
795
  var isGroup = collectColumn.some(hasChildrenList);
@@ -796,6 +798,7 @@ var Methods = {
796
798
  var treeNodeColumn;
797
799
  var checkboxColumn;
798
800
  var radioColumn;
801
+ var htmlColumn;
799
802
  var hasFixed;
800
803
  var handleFunc = function handleFunc(column, index, items, path, parent) {
801
804
  var colid = column.id,
@@ -821,6 +824,9 @@ var Methods = {
821
824
  if (!hasFixed && fixed) {
822
825
  hasFixed = fixed;
823
826
  }
827
+ if (!htmlColumn && type === 'html') {
828
+ htmlColumn = column;
829
+ }
824
830
  if (treeNode) {
825
831
  if (process.env.NODE_ENV === 'development') {
826
832
  if (treeNodeColumn) {
@@ -868,6 +874,16 @@ var Methods = {
868
874
  (0, _log.warnLog)('vxe.error.errConflicts', ["table.show-footer-overflow=".concat(_this12.showFooterOverflow), "column.show-footer-overflow=".concat(column.showFooterOverflow)]);
869
875
  }
870
876
  }
877
+ if (process.env.NODE_ENV === 'development') {
878
+ if (htmlColumn) {
879
+ if (!columnOpts.useKey) {
880
+ (0, _log.errLog)('vxe.error.reqProp', ['column-config.useKey', 'column.type=html']);
881
+ }
882
+ if (!rowOpts.useKey) {
883
+ (0, _log.errLog)('vxe.error.reqProp', ['row-config.useKey', 'column.type=html']);
884
+ }
885
+ }
886
+ }
871
887
  if (isAllOverflow && column.showOverflow === false) {
872
888
  isAllOverflow = false;
873
889
  }
@@ -1043,7 +1059,7 @@ var Methods = {
1043
1059
  expandOpts = this.expandOpts;
1044
1060
  var rowkey = (0, _util.getRowkey)(this);
1045
1061
  if (!_xeUtils["default"].isArray(records)) {
1046
- records = [records];
1062
+ records = [records || {}];
1047
1063
  }
1048
1064
  return records.map(function (record) {
1049
1065
  _this13.tableFullColumn.forEach(function (column) {
@@ -1087,14 +1103,8 @@ var Methods = {
1087
1103
  */
1088
1104
  createData: function createData(records) {
1089
1105
  var _this14 = this;
1090
- var treeConfig = this.treeConfig,
1091
- treeOpts = this.treeOpts;
1092
- var handleRrecord = function handleRrecord(record) {
1093
- return _this14.defineField(Object.assign({}, record));
1094
- };
1095
- var rows = treeConfig ? _xeUtils["default"].mapTree(records, handleRrecord, treeOpts) : records.map(handleRrecord);
1096
1106
  return this.$nextTick().then(function () {
1097
- return rows;
1107
+ return _this14.defineField(records);
1098
1108
  });
1099
1109
  },
1100
1110
  /**
@@ -1103,15 +1113,12 @@ var Methods = {
1103
1113
  * @param {Array/Object} records 新数据
1104
1114
  */
1105
1115
  createRow: function createRow(records) {
1106
- var _this15 = this;
1107
1116
  var isArr = _xeUtils["default"].isArray(records);
1108
1117
  if (!isArr) {
1109
1118
  records = [records];
1110
1119
  }
1111
- return this.$nextTick().then(function () {
1112
- return _this15.createData(records).then(function (rows) {
1113
- return isArr ? rows : rows[0];
1114
- });
1120
+ return this.createData(records).then(function (rows) {
1121
+ return isArr ? rows : rows[0];
1115
1122
  });
1116
1123
  },
1117
1124
  /**
@@ -1122,7 +1129,7 @@ var Methods = {
1122
1129
  * 如果还额外传了 field 则还原指定的单元格数据
1123
1130
  */
1124
1131
  revertData: function revertData(rows, field) {
1125
- var _this16 = this;
1132
+ var _this15 = this;
1126
1133
  var keepSource = this.keepSource,
1127
1134
  tableSourceData = this.tableSourceData,
1128
1135
  treeConfig = this.treeConfig;
@@ -1142,8 +1149,8 @@ var Methods = {
1142
1149
  }
1143
1150
  if (targetRows.length) {
1144
1151
  targetRows.forEach(function (row) {
1145
- if (!_this16.isInsertByRow(row)) {
1146
- var rowIndex = _this16.getRowIndex(row);
1152
+ if (!_this15.isInsertByRow(row)) {
1153
+ var rowIndex = _this15.getRowIndex(row);
1147
1154
  if (treeConfig && rowIndex === -1) {
1148
1155
  (0, _log.errLog)('vxe.error.noTree', ['revertData']);
1149
1156
  }
@@ -1217,7 +1224,7 @@ var Methods = {
1217
1224
  * @param {String} field 字段名
1218
1225
  */
1219
1226
  isUpdateByRow: function isUpdateByRow(row, field) {
1220
- var _this17 = this;
1227
+ var _this16 = this;
1221
1228
  var visibleColumn = this.visibleColumn,
1222
1229
  keepSource = this.keepSource,
1223
1230
  treeConfig = this.treeConfig,
@@ -1234,7 +1241,7 @@ var Methods = {
1234
1241
  if (treeConfig) {
1235
1242
  var children = treeOpts.children;
1236
1243
  var matchObj = _xeUtils["default"].findTree(tableSourceData, function (item) {
1237
- return rowid === (0, _util.getRowid)(_this17, item);
1244
+ return rowid === (0, _util.getRowid)(_this16, item);
1238
1245
  }, treeOpts);
1239
1246
  row = Object.assign({}, row, _defineProperty({}, children, null));
1240
1247
  if (matchObj) {
@@ -1305,7 +1312,7 @@ var Methods = {
1305
1312
  * 用于多选行,获取已选中的数据
1306
1313
  */
1307
1314
  getCheckboxRecords: function getCheckboxRecords(isFull) {
1308
- var _this18 = this;
1315
+ var _this17 = this;
1309
1316
  var tableFullData = this.tableFullData,
1310
1317
  afterFullData = this.afterFullData,
1311
1318
  treeConfig = this.treeConfig,
@@ -1335,13 +1342,13 @@ var Methods = {
1335
1342
  var selection = this.selection;
1336
1343
  if (treeConfig) {
1337
1344
  rowList = _xeUtils["default"].filterTree(currTableData, function (row) {
1338
- return _this18.findRowIndexOf(selection, row) > -1;
1345
+ return _this17.findRowIndexOf(selection, row) > -1;
1339
1346
  }, {
1340
1347
  children: transform ? mapChildren : children
1341
1348
  });
1342
1349
  } else {
1343
1350
  rowList = currTableData.filter(function (row) {
1344
- return _this18.findRowIndexOf(selection, row) > -1;
1351
+ return _this17.findRowIndexOf(selection, row) > -1;
1345
1352
  });
1346
1353
  }
1347
1354
  }
@@ -1379,7 +1386,7 @@ var Methods = {
1379
1386
  * 如果存在筛选条件,继续处理
1380
1387
  */
1381
1388
  updateAfterFullData: function updateAfterFullData() {
1382
- var _this19 = this;
1389
+ var _this18 = this;
1383
1390
  var tableFullColumn = this.tableFullColumn,
1384
1391
  tableFullData = this.tableFullData,
1385
1392
  filterOpts = this.filterOpts,
@@ -1455,7 +1462,7 @@ var Methods = {
1455
1462
  cellValue: cellValue,
1456
1463
  row: row,
1457
1464
  column: column,
1458
- $table: _this19
1465
+ $table: _this18
1459
1466
  });
1460
1467
  });
1461
1468
  } else if (compFilterMethod) {
@@ -1466,7 +1473,7 @@ var Methods = {
1466
1473
  cellValue: cellValue,
1467
1474
  row: row,
1468
1475
  column: column,
1469
- $table: _this19
1476
+ $table: _this18
1470
1477
  });
1471
1478
  });
1472
1479
  } else if (allFilterMethod) {
@@ -1485,7 +1492,7 @@ var Methods = {
1485
1492
  cellValue: cellValue,
1486
1493
  row: row,
1487
1494
  column: column,
1488
- $table: _this19
1495
+ $table: _this18
1489
1496
  });
1490
1497
  });
1491
1498
  }
@@ -1533,7 +1540,7 @@ var Methods = {
1533
1540
  tableTree = _xeUtils["default"].orderBy(tableTree, orderColumns.map(function (_ref2) {
1534
1541
  var column = _ref2.column,
1535
1542
  order = _ref2.order;
1536
- return [getOrderField(_this19, column), order];
1543
+ return [getOrderField(_this18, column), order];
1537
1544
  }));
1538
1545
  }
1539
1546
  tableData = tableTree;
@@ -1555,7 +1562,7 @@ var Methods = {
1555
1562
  tableData = _xeUtils["default"].orderBy(tableData, orderColumns.map(function (_ref3) {
1556
1563
  var column = _ref3.column,
1557
1564
  order = _ref3.order;
1558
- return [getOrderField(_this19, column), order];
1565
+ return [getOrderField(_this18, column), order];
1559
1566
  }));
1560
1567
  } else {
1561
1568
  // 兼容 v2,在 v4 中废弃, sortBy 不能为数组
@@ -1568,7 +1575,7 @@ var Methods = {
1568
1575
  tableData = _xeUtils["default"].orderBy(tableData, sortByConfs || [firstOrderColumn].map(function (_ref4) {
1569
1576
  var column = _ref4.column,
1570
1577
  order = _ref4.order;
1571
- return [getOrderField(_this19, column), order];
1578
+ return [getOrderField(_this18, column), order];
1572
1579
  }));
1573
1580
  }
1574
1581
  }
@@ -1584,7 +1591,7 @@ var Methods = {
1584
1591
  * 对渲染中的数据提前解析序号及索引。牺牲提前编译耗时换取渲染中额外损耗,使运行时更加流畅
1585
1592
  */
1586
1593
  updateAfterDataIndex: function updateAfterDataIndex() {
1587
- var _this20 = this;
1594
+ var _this19 = this;
1588
1595
  var treeConfig = this.treeConfig,
1589
1596
  afterFullData = this.afterFullData,
1590
1597
  fullDataRowIdData = this.fullDataRowIdData,
@@ -1593,7 +1600,7 @@ var Methods = {
1593
1600
  treeOpts = this.treeOpts;
1594
1601
  if (treeConfig) {
1595
1602
  _xeUtils["default"].eachTree(afterTreeFullData, function (row, index, items, path) {
1596
- var rowid = (0, _util.getRowid)(_this20, row);
1603
+ var rowid = (0, _util.getRowid)(_this19, row);
1597
1604
  var allrest = fullAllDataRowIdData[rowid];
1598
1605
  var seq = path.map(function (num, i) {
1599
1606
  return i % 2 === 0 ? Number(num) + 1 : '.';
@@ -1621,7 +1628,7 @@ var Methods = {
1621
1628
  });
1622
1629
  } else {
1623
1630
  afterFullData.forEach(function (row, index) {
1624
- var rowid = (0, _util.getRowid)(_this20, row);
1631
+ var rowid = (0, _util.getRowid)(_this19, row);
1625
1632
  var allrest = fullAllDataRowIdData[rowid];
1626
1633
  var seq = index + 1;
1627
1634
  if (allrest) {
@@ -1703,7 +1710,7 @@ var Methods = {
1703
1710
  * 默认执行一次,除非被重置
1704
1711
  */
1705
1712
  handleLoadDefaults: function handleLoadDefaults() {
1706
- var _this21 = this;
1713
+ var _this20 = this;
1707
1714
  if (this.checkboxConfig) {
1708
1715
  this.handleDefaultSelectionChecked();
1709
1716
  }
@@ -1723,7 +1730,7 @@ var Methods = {
1723
1730
  this.handleDefaultMergeFooterItems();
1724
1731
  }
1725
1732
  this.$nextTick(function () {
1726
- return setTimeout(_this21.recalculate);
1733
+ return setTimeout(_this20.recalculate);
1727
1734
  });
1728
1735
  },
1729
1736
  /**
@@ -1961,11 +1968,11 @@ var Methods = {
1961
1968
  * 刷新列配置
1962
1969
  */
1963
1970
  refreshColumn: function refreshColumn() {
1964
- var _this22 = this;
1971
+ var _this21 = this;
1965
1972
  return this.parseColumns().then(function () {
1966
- return _this22.refreshScroll();
1973
+ return _this21.refreshScroll();
1967
1974
  }).then(function () {
1968
- return _this22.recalculate();
1975
+ return _this21.recalculate();
1969
1976
  });
1970
1977
  },
1971
1978
  /**
@@ -1973,7 +1980,7 @@ var Methods = {
1973
1980
  * 将固定的列左边、右边分别靠边
1974
1981
  */
1975
1982
  parseColumns: function parseColumns() {
1976
- var _this23 = this;
1983
+ var _this22 = this;
1977
1984
  var leftList = [];
1978
1985
  var centerList = [];
1979
1986
  var rightList = [];
@@ -2079,10 +2086,10 @@ var Methods = {
2079
2086
  this.visibleColumn = visibleColumn;
2080
2087
  this.handleTableColumn();
2081
2088
  return this.updateFooter().then(function () {
2082
- return _this23.recalculate();
2089
+ return _this22.recalculate();
2083
2090
  }).then(function () {
2084
- _this23.updateCellAreas();
2085
- return _this23.recalculate();
2091
+ _this22.updateCellAreas();
2092
+ return _this22.recalculate();
2086
2093
  });
2087
2094
  },
2088
2095
  /**
@@ -2134,7 +2141,7 @@ var Methods = {
2134
2141
  * 刷新滚动操作,手动同步滚动相关位置(对于某些特殊的操作,比如滚动条错位、固定列不同步)
2135
2142
  */
2136
2143
  refreshScroll: function refreshScroll() {
2137
- var _this24 = this;
2144
+ var _this23 = this;
2138
2145
  var lastScrollLeft = this.lastScrollLeft,
2139
2146
  lastScrollTop = this.lastScrollTop;
2140
2147
  var $refs = this.$refs;
@@ -2149,7 +2156,7 @@ var Methods = {
2149
2156
  return new Promise(function (resolve) {
2150
2157
  // 还原滚动条位置
2151
2158
  if (lastScrollLeft || lastScrollTop) {
2152
- return (0, _util.restoreScrollLocation)(_this24, lastScrollLeft, lastScrollTop).then(function () {
2159
+ return (0, _util.restoreScrollLocation)(_this23, lastScrollLeft, lastScrollTop).then(function () {
2153
2160
  // 存在滚动行为未结束情况
2154
2161
  setTimeout(resolve, 30);
2155
2162
  });
@@ -2168,7 +2175,7 @@ var Methods = {
2168
2175
  * 支持 width=? width=?px width=?% min-width=? min-width=?px min-width=?%
2169
2176
  */
2170
2177
  recalculate: function recalculate(refull) {
2171
- var _this25 = this;
2178
+ var _this24 = this;
2172
2179
  var $refs = this.$refs;
2173
2180
  var tableBody = $refs.tableBody,
2174
2181
  tableHeader = $refs.tableHeader,
@@ -2181,8 +2188,8 @@ var Methods = {
2181
2188
  if (refull === true) {
2182
2189
  // 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
2183
2190
  return this.computeScrollLoad().then(function () {
2184
- _this25.autoCellWidth(headerElem, bodyElem, footerElem);
2185
- return _this25.computeScrollLoad();
2191
+ _this24.autoCellWidth(headerElem, bodyElem, footerElem);
2192
+ return _this24.computeScrollLoad();
2186
2193
  });
2187
2194
  }
2188
2195
  }
@@ -2316,7 +2323,7 @@ var Methods = {
2316
2323
  this.customMaxHeight = calcHeight(this, 'maxHeight');
2317
2324
  },
2318
2325
  updateStyle: function updateStyle() {
2319
- var _this26 = this;
2326
+ var _this25 = this;
2320
2327
  var $refs = this.$refs,
2321
2328
  isGroup = this.isGroup,
2322
2329
  fullColumnIdData = this.fullColumnIdData,
@@ -2404,7 +2411,7 @@ var Methods = {
2404
2411
  var listElem = elemStore["".concat(name, "-").concat(layout, "-list")];
2405
2412
  if (isGroup && listElem) {
2406
2413
  _xeUtils["default"].arrayEach(listElem.querySelectorAll('.col--group'), function (thElem) {
2407
- var colNode = _this26.getColumnNode(thElem);
2414
+ var colNode = _this25.getColumnNode(thElem);
2408
2415
  if (colNode) {
2409
2416
  var column = colNode.item;
2410
2417
  var showHeaderOverflow = column.showHeaderOverflow;
@@ -2459,7 +2466,7 @@ var Methods = {
2459
2466
  // 如果是使用优化模式
2460
2467
  if (fixedType) {
2461
2468
  // 如果存在展开行使用全量渲染
2462
- if (!_this26.expandColumn && (scrollXLoad || scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow))) {
2469
+ if (!_this25.expandColumn && (scrollXLoad || scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow))) {
2463
2470
  if (!mergeList.length && !spanMethod && !(keyboardConfig && keyboardOpts.isMerge)) {
2464
2471
  _renderColumnList = fixedColumn;
2465
2472
  } else {
@@ -2487,7 +2494,7 @@ var Methods = {
2487
2494
  // 如果是使用优化模式
2488
2495
  if (fixedType) {
2489
2496
  // 如果存在展开行使用全量渲染
2490
- if (!_this26.expandColumn && (scrollXLoad || allColumnFooterOverflow)) {
2497
+ if (!_this25.expandColumn && (scrollXLoad || allColumnFooterOverflow)) {
2491
2498
  if (!mergeFooterList.length || !footerSpanMethod) {
2492
2499
  _renderColumnList2 = fixedColumn;
2493
2500
  } else {
@@ -2554,9 +2561,9 @@ var Methods = {
2554
2561
  var colWidth = column.renderWidth;
2555
2562
  if (cellElem) {
2556
2563
  if (colspan > 1) {
2557
- var columnIndex = _this26.getColumnIndex(column);
2564
+ var columnIndex = _this25.getColumnIndex(column);
2558
2565
  for (var _index = 1; _index < colspan; _index++) {
2559
- var nextColumn = _this26.getColumns(columnIndex + _index);
2566
+ var nextColumn = _this25.getColumns(columnIndex + _index);
2560
2567
  if (nextColumn) {
2561
2568
  colWidth += nextColumn.renderWidth;
2562
2569
  }
@@ -2598,13 +2605,13 @@ var Methods = {
2598
2605
  }
2599
2606
  },
2600
2607
  preventEvent: function preventEvent(evnt, type, args, next, end) {
2601
- var _this27 = this;
2608
+ var _this26 = this;
2602
2609
  var evntList = _vXETable["default"].interceptor.get(type);
2603
2610
  var rest;
2604
2611
  if (!evntList.some(function (func) {
2605
2612
  return func(Object.assign({
2606
- $grid: _this27.$xegrid,
2607
- $table: _this27,
2613
+ $grid: _this26.$xegrid,
2614
+ $table: _this26,
2608
2615
  $event: evnt
2609
2616
  }, args)) === false;
2610
2617
  })) {
@@ -2621,7 +2628,7 @@ var Methods = {
2621
2628
  * 全局按下事件处理
2622
2629
  */
2623
2630
  handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
2624
- var _this28 = this;
2631
+ var _this27 = this;
2625
2632
  var $el = this.$el,
2626
2633
  $refs = this.$refs,
2627
2634
  $xegrid = this.$xegrid,
@@ -2677,7 +2684,7 @@ var Methods = {
2677
2684
  isClearActived = getEventTargetNode(evnt, $el, 'vxe-footer--row').flag;
2678
2685
  }
2679
2686
  // 如果固定了高度且点击了行之外的空白处,则清除激活状态
2680
- if (!isClearActived && _this28.height && !_this28.overflowY) {
2687
+ if (!isClearActived && _this27.height && !_this27.overflowY) {
2681
2688
  var bodyWrapperElem = evnt.target;
2682
2689
  if (hasClass(bodyWrapperElem, 'vxe-table--body-wrapper')) {
2683
2690
  isClearActived = evnt.offsetY < bodyWrapperElem.clientHeight;
@@ -2687,7 +2694,7 @@ var Methods = {
2687
2694
  // 如果点击了当前表格之外
2688
2695
  !getEventTargetNode(evnt, $el).flag) {
2689
2696
  setTimeout(function () {
2690
- return _this28.clearEdit(evnt);
2697
+ return _this27.clearEdit(evnt);
2691
2698
  });
2692
2699
  }
2693
2700
  });
@@ -2700,8 +2707,8 @@ var Methods = {
2700
2707
  this.clearSelected();
2701
2708
  if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-areas-clear').flag) {
2702
2709
  this.preventEvent(evnt, 'event.clearAreas', {}, function () {
2703
- _this28.clearCellAreas();
2704
- _this28.clearCopyCellArea();
2710
+ _this27.clearCellAreas();
2711
+ _this27.clearCopyCellArea();
2705
2712
  });
2706
2713
  }
2707
2714
  }
@@ -2731,7 +2738,7 @@ var Methods = {
2731
2738
  * 表格键盘事件
2732
2739
  */
2733
2740
  keydownEvent: function keydownEvent(evnt) {
2734
- var _this29 = this;
2741
+ var _this28 = this;
2735
2742
  var filterStore = this.filterStore,
2736
2743
  ctxMenuStore = this.ctxMenuStore,
2737
2744
  editStore = this.editStore,
@@ -2744,30 +2751,30 @@ var Methods = {
2744
2751
  var isEsc = keyCode === 27;
2745
2752
  if (isEsc) {
2746
2753
  this.preventEvent(evnt, 'event.keydown', null, function () {
2747
- _this29.emitEvent('keydown-start', {}, evnt);
2748
- if (keyboardConfig && mouseConfig && mouseOpts.area && _this29.handleKeyboardEvent) {
2749
- _this29.handleKeyboardEvent(evnt);
2754
+ _this28.emitEvent('keydown-start', {}, evnt);
2755
+ if (keyboardConfig && mouseConfig && mouseOpts.area && _this28.handleKeyboardEvent) {
2756
+ _this28.handleKeyboardEvent(evnt);
2750
2757
  } else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
2751
2758
  evnt.stopPropagation();
2752
2759
  // 如果按下了 Esc 键,关闭快捷菜单、筛选
2753
- _this29.closeFilter();
2754
- _this29.closeMenu();
2760
+ _this28.closeFilter();
2761
+ _this28.closeMenu();
2755
2762
  if (keyboardConfig && keyboardOpts.isEsc) {
2756
2763
  // 如果是激活编辑状态,则取消编辑
2757
2764
  if (actived.row) {
2758
2765
  var params = actived.args;
2759
- _this29.clearEdit(evnt);
2766
+ _this28.clearEdit(evnt);
2760
2767
  // 如果配置了选中功能,则为选中状态
2761
2768
  if (mouseConfig && mouseOpts.selected) {
2762
- _this29.$nextTick(function () {
2763
- return _this29.handleSelected(params, evnt);
2769
+ _this28.$nextTick(function () {
2770
+ return _this28.handleSelected(params, evnt);
2764
2771
  });
2765
2772
  }
2766
2773
  }
2767
2774
  }
2768
2775
  }
2769
- _this29.emitEvent('keydown', {}, evnt);
2770
- _this29.emitEvent('keydown-end', {}, evnt);
2776
+ _this28.emitEvent('keydown', {}, evnt);
2777
+ _this28.emitEvent('keydown-end', {}, evnt);
2771
2778
  });
2772
2779
  }
2773
2780
  },
@@ -2775,26 +2782,26 @@ var Methods = {
2775
2782
  * 全局键盘事件
2776
2783
  */
2777
2784
  handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
2778
- var _this30 = this;
2785
+ var _this29 = this;
2779
2786
  // 该行为只对当前激活的表格有效
2780
2787
  if (this.isActivated) {
2781
2788
  this.preventEvent(evnt, 'event.keydown', null, function () {
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;
2789
+ var filterStore = _this29.filterStore,
2790
+ isCtxMenu = _this29.isCtxMenu,
2791
+ ctxMenuStore = _this29.ctxMenuStore,
2792
+ editStore = _this29.editStore,
2793
+ editOpts = _this29.editOpts,
2794
+ editConfig = _this29.editConfig,
2795
+ mouseConfig = _this29.mouseConfig,
2796
+ mouseOpts = _this29.mouseOpts,
2797
+ keyboardConfig = _this29.keyboardConfig,
2798
+ keyboardOpts = _this29.keyboardOpts,
2799
+ treeConfig = _this29.treeConfig,
2800
+ treeOpts = _this29.treeOpts,
2801
+ highlightCurrentRow = _this29.highlightCurrentRow,
2802
+ currentRow = _this29.currentRow,
2803
+ bodyCtxMenu = _this29.bodyCtxMenu,
2804
+ rowOpts = _this29.rowOpts;
2798
2805
  var selected = editStore.selected,
2799
2806
  actived = editStore.actived;
2800
2807
  var keyCode = evnt.keyCode;
@@ -2820,7 +2827,7 @@ var Methods = {
2820
2827
  var params;
2821
2828
  if (filterStore.visible) {
2822
2829
  if (isEsc) {
2823
- _this30.closeFilter();
2830
+ _this29.closeFilter();
2824
2831
  }
2825
2832
  return;
2826
2833
  }
@@ -2828,19 +2835,19 @@ var Methods = {
2828
2835
  // 如果配置了右键菜单; 支持方向键操作、回车
2829
2836
  evnt.preventDefault();
2830
2837
  if (ctxMenuStore.showChild && hasChildrenList(ctxMenuStore.selected)) {
2831
- _this30.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selectChild', 37, false, ctxMenuStore.selected.children);
2838
+ _this29.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selectChild', 37, false, ctxMenuStore.selected.children);
2832
2839
  } else {
2833
- _this30.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selected', 39, true, _this30.ctxMenuList);
2840
+ _this29.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selected', 39, true, _this29.ctxMenuList);
2834
2841
  }
2835
- } else if (keyboardConfig && mouseConfig && mouseOpts.area && _this30.handleKeyboardEvent) {
2836
- _this30.handleKeyboardEvent(evnt);
2842
+ } else if (keyboardConfig && mouseConfig && mouseOpts.area && _this29.handleKeyboardEvent) {
2843
+ _this29.handleKeyboardEvent(evnt);
2837
2844
  } else if (keyboardConfig && isSpacebar && keyboardOpts.isChecked && selected.row && selected.column && (selected.column.type === 'checkbox' || selected.column.type === 'radio')) {
2838
2845
  // 空格键支持选中复选框
2839
2846
  evnt.preventDefault();
2840
2847
  if (selected.column.type === 'checkbox') {
2841
- _this30.handleToggleCheckRowEvent(evnt, selected.args);
2848
+ _this29.handleToggleCheckRowEvent(evnt, selected.args);
2842
2849
  } else {
2843
- _this30.triggerRadioRowEvent(evnt, selected.args);
2850
+ _this29.triggerRadioRowEvent(evnt, selected.args);
2844
2851
  }
2845
2852
  } else if (isF2 && (0, _utils.isEnableConf)(editConfig)) {
2846
2853
  if (!isEditStatus) {
@@ -2848,15 +2855,15 @@ var Methods = {
2848
2855
  if (selected.row && selected.column) {
2849
2856
  evnt.stopPropagation();
2850
2857
  evnt.preventDefault();
2851
- _this30.handleActived(selected.args, evnt);
2858
+ _this29.handleActived(selected.args, evnt);
2852
2859
  }
2853
2860
  }
2854
2861
  } else if (isContextMenu) {
2855
2862
  // 如果按下上下文键
2856
- _this30._keyCtx = selected.row && selected.column && bodyCtxMenu.length;
2857
- clearTimeout(_this30.keyCtxTimeout);
2858
- _this30.keyCtxTimeout = setTimeout(function () {
2859
- _this30._keyCtx = false;
2863
+ _this29._keyCtx = selected.row && selected.column && bodyCtxMenu.length;
2864
+ clearTimeout(_this29.keyCtxTimeout);
2865
+ _this29.keyCtxTimeout = setTimeout(function () {
2866
+ _this29._keyCtx = false;
2860
2867
  }, 1000);
2861
2868
  } else if (isEnter && !hasAltKey && keyboardConfig && keyboardOpts.isEnter && (selected.row || actived.row || treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow)) {
2862
2869
  // 退出选中
@@ -2864,11 +2871,11 @@ var Methods = {
2864
2871
  // 如果是激活编辑状态,则取消编辑
2865
2872
  if (actived.row) {
2866
2873
  params = actived.args;
2867
- _this30.clearEdit(evnt);
2874
+ _this29.clearEdit(evnt);
2868
2875
  // 如果配置了选中功能,则为选中状态
2869
2876
  if (mouseConfig && mouseOpts.selected) {
2870
- _this30.$nextTick(function () {
2871
- return _this30.handleSelected(params, evnt);
2877
+ _this29.$nextTick(function () {
2878
+ return _this29.handleSelected(params, evnt);
2872
2879
  });
2873
2880
  }
2874
2881
  }
@@ -2878,15 +2885,15 @@ var Methods = {
2878
2885
  var targetArgs = selected.row ? selected.args : actived.args;
2879
2886
  if (hasShiftKey) {
2880
2887
  if (keyboardOpts.enterToTab) {
2881
- _this30.moveTabSelected(targetArgs, hasShiftKey, evnt);
2888
+ _this29.moveTabSelected(targetArgs, hasShiftKey, evnt);
2882
2889
  } else {
2883
- _this30.moveSelected(targetArgs, isLeftArrow, true, isRightArrow, false, evnt);
2890
+ _this29.moveSelected(targetArgs, isLeftArrow, true, isRightArrow, false, evnt);
2884
2891
  }
2885
2892
  } else {
2886
2893
  if (keyboardOpts.enterToTab) {
2887
- _this30.moveTabSelected(targetArgs, hasShiftKey, evnt);
2894
+ _this29.moveTabSelected(targetArgs, hasShiftKey, evnt);
2888
2895
  } else {
2889
- _this30.moveSelected(targetArgs, isLeftArrow, false, isRightArrow, true, evnt);
2896
+ _this29.moveSelected(targetArgs, isLeftArrow, false, isRightArrow, true, evnt);
2890
2897
  }
2891
2898
  }
2892
2899
  } else if (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
@@ -2896,13 +2903,13 @@ var Methods = {
2896
2903
  evnt.preventDefault();
2897
2904
  var targetRow = childrens[0];
2898
2905
  params = {
2899
- $table: _this30,
2906
+ $table: _this29,
2900
2907
  row: targetRow
2901
2908
  };
2902
- _this30.setTreeExpand(currentRow, true).then(function () {
2903
- return _this30.scrollToRow(targetRow);
2909
+ _this29.setTreeExpand(currentRow, true).then(function () {
2910
+ return _this29.scrollToRow(targetRow);
2904
2911
  }).then(function () {
2905
- return _this30.triggerCurrentRowEvent(evnt, params);
2912
+ return _this29.triggerCurrentRowEvent(evnt, params);
2906
2913
  });
2907
2914
  }
2908
2915
  }
@@ -2911,18 +2918,18 @@ var Methods = {
2911
2918
  if (!isEditStatus) {
2912
2919
  // 如果按下了方向键
2913
2920
  if (selected.row && selected.column) {
2914
- _this30.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
2921
+ _this29.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
2915
2922
  } else if ((isUpArrow || isDwArrow) && (rowOpts.isCurrent || highlightCurrentRow)) {
2916
2923
  // 当前行按键上下移动
2917
- _this30.moveCurrentRow(isUpArrow, isDwArrow, evnt);
2924
+ _this29.moveCurrentRow(isUpArrow, isDwArrow, evnt);
2918
2925
  }
2919
2926
  }
2920
2927
  } else if (isTab && keyboardConfig && keyboardOpts.isTab) {
2921
2928
  // 如果按下了 Tab 键切换
2922
2929
  if (selected.row || selected.column) {
2923
- _this30.moveTabSelected(selected.args, hasShiftKey, evnt);
2930
+ _this29.moveTabSelected(selected.args, hasShiftKey, evnt);
2924
2931
  } else if (actived.row || actived.column) {
2925
- _this30.moveTabSelected(actived.args, hasShiftKey, evnt);
2932
+ _this29.moveTabSelected(actived.args, hasShiftKey, evnt);
2926
2933
  }
2927
2934
  } else if (keyboardConfig && (isDel || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow ? isBack && keyboardOpts.isArrow : isBack))) {
2928
2935
  if (!isEditStatus) {
@@ -2933,10 +2940,10 @@ var Methods = {
2933
2940
  if (delMethod) {
2934
2941
  delMethod({
2935
2942
  row: selected.row,
2936
- rowIndex: _this30.getRowIndex(selected.row),
2943
+ rowIndex: _this29.getRowIndex(selected.row),
2937
2944
  column: selected.column,
2938
- columnIndex: _this30.getColumnIndex(selected.column),
2939
- $table: _this30
2945
+ columnIndex: _this29.getColumnIndex(selected.column),
2946
+ $table: _this29
2940
2947
  });
2941
2948
  } else {
2942
2949
  setCellValue(selected.row, selected.column, null);
@@ -2945,34 +2952,34 @@ var Methods = {
2945
2952
  if (backMethod) {
2946
2953
  backMethod({
2947
2954
  row: selected.row,
2948
- rowIndex: _this30.getRowIndex(selected.row),
2955
+ rowIndex: _this29.getRowIndex(selected.row),
2949
2956
  column: selected.column,
2950
- columnIndex: _this30.getColumnIndex(selected.column),
2951
- $table: _this30
2957
+ columnIndex: _this29.getColumnIndex(selected.column),
2958
+ $table: _this29
2952
2959
  });
2953
2960
  } else {
2954
- _this30.handleActived(selected.args, evnt);
2961
+ _this29.handleActived(selected.args, evnt);
2955
2962
  }
2956
2963
  } else if (isDel) {
2957
2964
  // 如果按下 del 键,更新表尾数据
2958
- _this30.updateFooter();
2965
+ _this29.updateFooter();
2959
2966
  }
2960
2967
  } else if (isBack && keyboardOpts.isArrow && treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
2961
2968
  // 如果树形表格回退键关闭当前行返回父节点
2962
- var _XEUtils$findTree = _xeUtils["default"].findTree(_this30.afterFullData, function (item) {
2969
+ var _XEUtils$findTree = _xeUtils["default"].findTree(_this29.afterFullData, function (item) {
2963
2970
  return item === currentRow;
2964
2971
  }, treeOpts),
2965
2972
  parentRow = _XEUtils$findTree.parent;
2966
2973
  if (parentRow) {
2967
2974
  evnt.preventDefault();
2968
2975
  params = {
2969
- $table: _this30,
2976
+ $table: _this29,
2970
2977
  row: parentRow
2971
2978
  };
2972
- _this30.setTreeExpand(parentRow, false).then(function () {
2973
- return _this30.scrollToRow(parentRow);
2979
+ _this29.setTreeExpand(parentRow, false).then(function () {
2980
+ return _this29.scrollToRow(parentRow);
2974
2981
  }).then(function () {
2975
- return _this30.triggerCurrentRowEvent(evnt, params);
2982
+ return _this29.triggerCurrentRowEvent(evnt, params);
2976
2983
  });
2977
2984
  }
2978
2985
  }
@@ -2987,24 +2994,24 @@ var Methods = {
2987
2994
  if (selected.column && selected.row && (0, _utils.isEnableConf)(selected.column.editRender)) {
2988
2995
  var beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod;
2989
2996
  if (!beforeEditMethod || beforeEditMethod(_objectSpread(_objectSpread({}, selected.args), {}, {
2990
- $table: _this30
2997
+ $table: _this29
2991
2998
  }))) {
2992
2999
  if (editMethod) {
2993
3000
  editMethod({
2994
3001
  row: selected.row,
2995
- rowIndex: _this30.getRowIndex(selected.row),
3002
+ rowIndex: _this29.getRowIndex(selected.row),
2996
3003
  column: selected.column,
2997
- columnIndex: _this30.getColumnIndex(selected.column),
2998
- $table: _this30
3004
+ columnIndex: _this29.getColumnIndex(selected.column),
3005
+ $table: _this29
2999
3006
  });
3000
3007
  } else {
3001
3008
  setCellValue(selected.row, selected.column, null);
3002
- _this30.handleActived(selected.args, evnt);
3009
+ _this29.handleActived(selected.args, evnt);
3003
3010
  }
3004
3011
  }
3005
3012
  }
3006
3013
  }
3007
- _this30.emitEvent('keydown', {}, evnt);
3014
+ _this29.emitEvent('keydown', {}, evnt);
3008
3015
  });
3009
3016
  }
3010
3017
  },
@@ -3079,7 +3086,7 @@ var Methods = {
3079
3086
  }
3080
3087
  },
3081
3088
  handleTargetLeaveEvent: function handleTargetLeaveEvent() {
3082
- var _this31 = this;
3089
+ var _this30 = this;
3083
3090
  var tooltipOpts = this.tooltipOpts;
3084
3091
  var $tooltip = this.$refs.tooltip;
3085
3092
  if ($tooltip) {
@@ -3087,9 +3094,9 @@ var Methods = {
3087
3094
  }
3088
3095
  if (tooltipOpts.enterable) {
3089
3096
  this.tooltipTimeout = setTimeout(function () {
3090
- $tooltip = _this31.$refs.tooltip;
3097
+ $tooltip = _this30.$refs.tooltip;
3091
3098
  if ($tooltip && !$tooltip.isActived()) {
3092
- _this31.closeTooltip();
3099
+ _this30.closeTooltip();
3093
3100
  }
3094
3101
  }, tooltipOpts.leaveDelay);
3095
3102
  } else {
@@ -3267,13 +3274,13 @@ var Methods = {
3267
3274
  * 获取复选框半选状态的行数据
3268
3275
  */
3269
3276
  getCheckboxIndeterminateRecords: function getCheckboxIndeterminateRecords(isFull) {
3270
- var _this32 = this;
3277
+ var _this31 = this;
3271
3278
  var treeConfig = this.treeConfig,
3272
3279
  treeIndeterminates = this.treeIndeterminates,
3273
3280
  fullDataRowIdData = this.fullDataRowIdData;
3274
3281
  if (treeConfig) {
3275
3282
  return isFull ? treeIndeterminates.slice(0) : treeIndeterminates.filter(function (row) {
3276
- var rowid = (0, _util.getRowid)(_this32, row);
3283
+ var rowid = (0, _util.getRowid)(_this31, row);
3277
3284
  return fullDataRowIdData[rowid];
3278
3285
  });
3279
3286
  }
@@ -3300,12 +3307,12 @@ var Methods = {
3300
3307
  }
3301
3308
  },
3302
3309
  handleCheckedCheckboxRow: function handleCheckedCheckboxRow(rows, value, isForce) {
3303
- var _this33 = this;
3310
+ var _this32 = this;
3304
3311
  if (rows && !_xeUtils["default"].isArray(rows)) {
3305
3312
  rows = [rows];
3306
3313
  }
3307
3314
  rows.forEach(function (row) {
3308
- return _this33.handleSelectRow({
3315
+ return _this32.handleSelectRow({
3309
3316
  row: row
3310
3317
  }, !!value, isForce);
3311
3318
  });
@@ -3336,7 +3343,7 @@ var Methods = {
3336
3343
  * value 选中true 不选false 半选-1
3337
3344
  */
3338
3345
  handleSelectRow: function handleSelectRow(_ref6, value, isForce) {
3339
- var _this34 = this;
3346
+ var _this33 = this;
3340
3347
  var row = _ref6.row;
3341
3348
  var selection = this.selection,
3342
3349
  afterFullData = this.afterFullData,
@@ -3357,20 +3364,20 @@ var Methods = {
3357
3364
  } else {
3358
3365
  // 更新子节点状态
3359
3366
  _xeUtils["default"].eachTree([row], function (item) {
3360
- if (_this34.eqRow(item, row) || isForce || !checkMethod || checkMethod({
3367
+ if (_this33.eqRow(item, row) || isForce || !checkMethod || checkMethod({
3361
3368
  row: item
3362
3369
  })) {
3363
3370
  _xeUtils["default"].set(item, checkField, value);
3364
3371
  _xeUtils["default"].remove(treeIndeterminates, function (half) {
3365
- return _this34.eqRow(half, item);
3372
+ return _this33.eqRow(half, item);
3366
3373
  });
3367
- _this34.handleCheckboxReserveRow(row, value);
3374
+ _this33.handleCheckboxReserveRow(row, value);
3368
3375
  }
3369
3376
  }, treeOpts);
3370
3377
  }
3371
3378
  // 如果存在父节点,更新父节点状态
3372
3379
  var matchObj = _xeUtils["default"].findTree(afterFullData, function (item) {
3373
- return _this34.eqRow(item, row);
3380
+ return _this33.eqRow(item, row);
3374
3381
  }, treeOpts);
3375
3382
  if (matchObj && matchObj.parent) {
3376
3383
  var parentStatus;
@@ -3380,7 +3387,7 @@ var Methods = {
3380
3387
  });
3381
3388
  }) : matchObj.items;
3382
3389
  var indeterminatesItem = _xeUtils["default"].find(matchObj.items, function (item) {
3383
- return _this34.findRowIndexOf(treeIndeterminates, item) > -1;
3390
+ return _this33.findRowIndexOf(treeIndeterminates, item) > -1;
3384
3391
  });
3385
3392
  if (indeterminatesItem) {
3386
3393
  parentStatus = -1;
@@ -3389,7 +3396,7 @@ var Methods = {
3389
3396
  return _xeUtils["default"].get(item, checkField);
3390
3397
  });
3391
3398
  parentStatus = selectItems.filter(function (item) {
3392
- return _this34.findRowIndexOf(vItems, item) > -1;
3399
+ return _this33.findRowIndexOf(vItems, item) > -1;
3393
3400
  }).length === vItems.length ? true : selectItems.length || value === -1 ? -1 : false;
3394
3401
  }
3395
3402
  return this.handleSelectRow({
@@ -3411,31 +3418,31 @@ var Methods = {
3411
3418
  treeIndeterminates.push(row);
3412
3419
  }
3413
3420
  _xeUtils["default"].remove(selection, function (item) {
3414
- return _this34.eqRow(item, row);
3421
+ return _this33.eqRow(item, row);
3415
3422
  });
3416
3423
  } else {
3417
3424
  // 更新子节点状态
3418
3425
  _xeUtils["default"].eachTree([row], function (item) {
3419
- if (_this34.eqRow(item, row) || isForce || !checkMethod || checkMethod({
3426
+ if (_this33.eqRow(item, row) || isForce || !checkMethod || checkMethod({
3420
3427
  row: item
3421
3428
  })) {
3422
3429
  if (value) {
3423
3430
  selection.push(item);
3424
3431
  } else {
3425
3432
  _xeUtils["default"].remove(selection, function (select) {
3426
- return _this34.eqRow(select, item);
3433
+ return _this33.eqRow(select, item);
3427
3434
  });
3428
3435
  }
3429
3436
  _xeUtils["default"].remove(treeIndeterminates, function (half) {
3430
- return _this34.eqRow(half, item);
3437
+ return _this33.eqRow(half, item);
3431
3438
  });
3432
- _this34.handleCheckboxReserveRow(row, value);
3439
+ _this33.handleCheckboxReserveRow(row, value);
3433
3440
  }
3434
3441
  }, treeOpts);
3435
3442
  }
3436
3443
  // 如果存在父节点,更新父节点状态
3437
3444
  var _matchObj = _xeUtils["default"].findTree(afterFullData, function (item) {
3438
- return _this34.eqRow(item, row);
3445
+ return _this33.eqRow(item, row);
3439
3446
  }, treeOpts);
3440
3447
  if (_matchObj && _matchObj.parent) {
3441
3448
  var _parentStatus;
@@ -3445,16 +3452,16 @@ var Methods = {
3445
3452
  });
3446
3453
  }) : _matchObj.items;
3447
3454
  var _indeterminatesItem = _xeUtils["default"].find(_matchObj.items, function (item) {
3448
- return _this34.findRowIndexOf(treeIndeterminates, item) > -1;
3455
+ return _this33.findRowIndexOf(treeIndeterminates, item) > -1;
3449
3456
  });
3450
3457
  if (_indeterminatesItem) {
3451
3458
  _parentStatus = -1;
3452
3459
  } else {
3453
3460
  var _selectItems = _matchObj.items.filter(function (item) {
3454
- return _this34.findRowIndexOf(selection, item) > -1;
3461
+ return _this33.findRowIndexOf(selection, item) > -1;
3455
3462
  });
3456
3463
  _parentStatus = _selectItems.filter(function (item) {
3457
- return _this34.findRowIndexOf(_vItems, item) > -1;
3464
+ return _this33.findRowIndexOf(_vItems, item) > -1;
3458
3465
  }).length === _vItems.length ? true : _selectItems.length || value === -1 ? -1 : false;
3459
3466
  }
3460
3467
  return this.handleSelectRow({
@@ -3471,7 +3478,7 @@ var Methods = {
3471
3478
  }
3472
3479
  } else {
3473
3480
  _xeUtils["default"].remove(selection, function (item) {
3474
- return _this34.eqRow(item, row);
3481
+ return _this33.eqRow(item, row);
3475
3482
  });
3476
3483
  }
3477
3484
  this.handleCheckboxReserveRow(row, value);
@@ -3520,7 +3527,7 @@ var Methods = {
3520
3527
  return this.$nextTick();
3521
3528
  },
3522
3529
  handleCheckedAllCheckboxRow: function handleCheckedAllCheckboxRow(value, isForce) {
3523
- var _this35 = this;
3530
+ var _this34 = this;
3524
3531
  var afterFullData = this.afterFullData,
3525
3532
  treeConfig = this.treeConfig,
3526
3533
  treeOpts = this.treeOpts,
@@ -3533,7 +3540,7 @@ var Methods = {
3533
3540
  checkMethod = checkboxOpts.checkMethod;
3534
3541
  var selectRows = [];
3535
3542
  var beforeSelection = treeConfig ? [] : selection.filter(function (row) {
3536
- return _this35.findRowIndexOf(afterFullData, row) === -1;
3543
+ return _this34.findRowIndexOf(afterFullData, row) === -1;
3537
3544
  });
3538
3545
  if (checkStrictly) {
3539
3546
  this.isAllSelected = value;
@@ -3587,7 +3594,7 @@ var Methods = {
3587
3594
  _xeUtils["default"].eachTree(afterFullData, function (row) {
3588
3595
  if (checkMethod({
3589
3596
  row: row
3590
- }) ? 0 : _this35.findRowIndexOf(selection, row) > -1) {
3597
+ }) ? 0 : _this34.findRowIndexOf(selection, row) > -1) {
3591
3598
  selectRows.push(row);
3592
3599
  }
3593
3600
  }, treeOpts);
@@ -3602,7 +3609,7 @@ var Methods = {
3602
3609
  */
3603
3610
  if (!isForce && checkMethod) {
3604
3611
  selectRows = afterFullData.filter(function (row) {
3605
- return _this35.findRowIndexOf(selection, row) > -1 || checkMethod({
3612
+ return _this34.findRowIndexOf(selection, row) > -1 || checkMethod({
3606
3613
  row: row
3607
3614
  });
3608
3615
  });
@@ -3619,7 +3626,7 @@ var Methods = {
3619
3626
  selectRows = afterFullData.filter(function (row) {
3620
3627
  return checkMethod({
3621
3628
  row: row
3622
- }) ? 0 : _this35.findRowIndexOf(selection, row) > -1;
3629
+ }) ? 0 : _this34.findRowIndexOf(selection, row) > -1;
3623
3630
  });
3624
3631
  }
3625
3632
  }
@@ -3628,11 +3635,11 @@ var Methods = {
3628
3635
  if (reserve) {
3629
3636
  if (value) {
3630
3637
  selectRows.forEach(function (row) {
3631
- checkboxReserveRowMap[(0, _util.getRowid)(_this35, row)] = row;
3638
+ checkboxReserveRowMap[(0, _util.getRowid)(_this34, row)] = row;
3632
3639
  });
3633
3640
  } else {
3634
3641
  afterFullData.forEach(function (row) {
3635
- return _this35.handleCheckboxReserveRow(row, false);
3642
+ return _this34.handleCheckboxReserveRow(row, false);
3636
3643
  });
3637
3644
  }
3638
3645
  }
@@ -3650,7 +3657,7 @@ var Methods = {
3650
3657
  return this.handleCheckedAllCheckboxRow(value, true);
3651
3658
  },
3652
3659
  checkSelectionStatus: function checkSelectionStatus() {
3653
- var _this36 = this;
3660
+ var _this35 = this;
3654
3661
  var afterFullData = this.afterFullData,
3655
3662
  selection = this.selection,
3656
3663
  treeIndeterminates = this.treeIndeterminates,
@@ -3686,11 +3693,11 @@ var Methods = {
3686
3693
  if (treeConfig) {
3687
3694
  if (halfField) {
3688
3695
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
3689
- return _xeUtils["default"].get(row, checkField) || _xeUtils["default"].get(row, halfField) || _this36.findRowIndexOf(treeIndeterminates, row) > -1;
3696
+ return _xeUtils["default"].get(row, checkField) || _xeUtils["default"].get(row, halfField) || _this35.findRowIndexOf(treeIndeterminates, row) > -1;
3690
3697
  });
3691
3698
  } else {
3692
3699
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
3693
- return _xeUtils["default"].get(row, checkField) || _this36.findRowIndexOf(treeIndeterminates, row) > -1;
3700
+ return _xeUtils["default"].get(row, checkField) || _this35.findRowIndexOf(treeIndeterminates, row) > -1;
3694
3701
  });
3695
3702
  }
3696
3703
  } else {
@@ -3712,22 +3719,22 @@ var Methods = {
3712
3719
  disableRows.push(row);
3713
3720
  return true;
3714
3721
  }
3715
- if (_this36.findRowIndexOf(selection, row) > -1) {
3722
+ if (_this35.findRowIndexOf(selection, row) > -1) {
3716
3723
  checkRows.push(row);
3717
3724
  return true;
3718
3725
  }
3719
3726
  return false;
3720
3727
  } : function (row) {
3721
- return _this36.findRowIndexOf(selection, row) > -1;
3728
+ return _this35.findRowIndexOf(selection, row) > -1;
3722
3729
  });
3723
3730
  isAllSelected = isAllResolve && afterFullData.length !== disableRows.length;
3724
3731
  if (treeConfig) {
3725
3732
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
3726
- return _this36.findRowIndexOf(treeIndeterminates, row) > -1 || _this36.findRowIndexOf(selection, row) > -1;
3733
+ return _this35.findRowIndexOf(treeIndeterminates, row) > -1 || _this35.findRowIndexOf(selection, row) > -1;
3727
3734
  });
3728
3735
  } else {
3729
3736
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
3730
- return _this36.findRowIndexOf(selection, row) > -1;
3737
+ return _this35.findRowIndexOf(selection, row) > -1;
3731
3738
  });
3732
3739
  }
3733
3740
  }
@@ -3833,7 +3840,7 @@ var Methods = {
3833
3840
  * 获取复选框保留选中的行
3834
3841
  */
3835
3842
  getCheckboxReserveRecords: function getCheckboxReserveRecords(isFull) {
3836
- var _this37 = this;
3843
+ var _this36 = this;
3837
3844
  var fullDataRowIdData = this.fullDataRowIdData,
3838
3845
  afterFullData = this.afterFullData,
3839
3846
  checkboxReserveRowMap = this.checkboxReserveRowMap,
@@ -3845,11 +3852,11 @@ var Methods = {
3845
3852
  var afterFullIdMaps = {};
3846
3853
  if (treeConfig) {
3847
3854
  _xeUtils["default"].eachTree(afterFullData, function (row) {
3848
- afterFullIdMaps[(0, _util.getRowid)(_this37, row)] = 1;
3855
+ afterFullIdMaps[(0, _util.getRowid)(_this36, row)] = 1;
3849
3856
  }, treeOpts);
3850
3857
  } else {
3851
3858
  afterFullData.forEach(function (row) {
3852
- afterFullIdMaps[(0, _util.getRowid)(_this37, row)] = 1;
3859
+ afterFullIdMaps[(0, _util.getRowid)(_this36, row)] = 1;
3853
3860
  });
3854
3861
  }
3855
3862
  _xeUtils["default"].each(checkboxReserveRowMap, function (oldRow, oldRowid) {
@@ -3908,7 +3915,7 @@ var Methods = {
3908
3915
  * 清空行为不管是否被禁用还是保留记录,都将彻底清空选中状态
3909
3916
  */
3910
3917
  clearCheckboxRow: function clearCheckboxRow() {
3911
- var _this38 = this;
3918
+ var _this37 = this;
3912
3919
  var tableFullData = this.tableFullData,
3913
3920
  treeConfig = this.treeConfig,
3914
3921
  treeOpts = this.treeOpts,
@@ -3928,7 +3935,7 @@ var Methods = {
3928
3935
  }
3929
3936
  if (reserve) {
3930
3937
  tableFullData.forEach(function (row) {
3931
- return _this38.handleCheckboxReserveRow(row, false);
3938
+ return _this37.handleCheckboxReserveRow(row, false);
3932
3939
  });
3933
3940
  }
3934
3941
  this.isAllSelected = false;
@@ -4180,12 +4187,12 @@ var Methods = {
4180
4187
  * 如果存在规则,则校验
4181
4188
  */
4182
4189
  handleChangeCell: function handleChangeCell(evnt, params) {
4183
- var _this39 = this;
4190
+ var _this38 = this;
4184
4191
  this.checkValidate('blur')["catch"](function (e) {
4185
4192
  return e;
4186
4193
  }).then(function () {
4187
- _this39.handleActived(params, evnt).then(function () {
4188
- return _this39.checkValidate('change');
4194
+ _this38.handleActived(params, evnt).then(function () {
4195
+ return _this38.checkValidate('change');
4189
4196
  })["catch"](function (e) {
4190
4197
  return e;
4191
4198
  });
@@ -4279,7 +4286,7 @@ var Methods = {
4279
4286
  * 如果是双击模式,则激活为编辑状态
4280
4287
  */
4281
4288
  triggerCellDblclickEvent: function triggerCellDblclickEvent(evnt, params) {
4282
- var _this40 = this;
4289
+ var _this39 = this;
4283
4290
  var editStore = this.editStore,
4284
4291
  editConfig = this.editConfig,
4285
4292
  editOpts = this.editOpts;
@@ -4292,15 +4299,15 @@ var Methods = {
4292
4299
  this.checkValidate('blur')["catch"](function (e) {
4293
4300
  return e;
4294
4301
  }).then(function () {
4295
- _this40.handleActived(params, evnt).then(function () {
4296
- return _this40.checkValidate('change');
4302
+ _this39.handleActived(params, evnt).then(function () {
4303
+ return _this39.checkValidate('change');
4297
4304
  })["catch"](function (e) {
4298
4305
  return e;
4299
4306
  });
4300
4307
  });
4301
4308
  } else if (editOpts.mode === 'cell') {
4302
4309
  this.handleActived(params, evnt).then(function () {
4303
- return _this40.checkValidate('change');
4310
+ return _this39.checkValidate('change');
4304
4311
  })["catch"](function (e) {
4305
4312
  return e;
4306
4313
  });
@@ -4310,7 +4317,7 @@ var Methods = {
4310
4317
  this.emitEvent('cell-dblclick', params, evnt);
4311
4318
  },
4312
4319
  handleDefaultSort: function handleDefaultSort() {
4313
- var _this41 = this;
4320
+ var _this40 = this;
4314
4321
  var sortConfig = this.sortConfig,
4315
4322
  sortOpts = this.sortOpts;
4316
4323
  var defaultSort = sortOpts.defaultSort;
@@ -4323,7 +4330,7 @@ var Methods = {
4323
4330
  var field = item.field,
4324
4331
  order = item.order;
4325
4332
  if (field && order) {
4326
- var column = _this41.getColumnByField(field);
4333
+ var column = _this40.getColumnByField(field);
4327
4334
  if (column && column.sortable) {
4328
4335
  column.order = order;
4329
4336
  column.sortTime = Date.now() + index;
@@ -4364,7 +4371,7 @@ var Methods = {
4364
4371
  }
4365
4372
  },
4366
4373
  sort: function sort(sortConfs, sortOrder) {
4367
- var _this42 = this;
4374
+ var _this41 = this;
4368
4375
  var sortOpts = this.sortOpts;
4369
4376
  var multiple = sortOpts.multiple,
4370
4377
  remote = sortOpts.remote,
@@ -4390,14 +4397,14 @@ var Methods = {
4390
4397
  order = confs.order;
4391
4398
  var column = field;
4392
4399
  if (_xeUtils["default"].isString(field)) {
4393
- column = _this42.getColumnByField(field);
4400
+ column = _this41.getColumnByField(field);
4394
4401
  }
4395
4402
  if (column && (column.sortable || column.remoteSort)) {
4396
4403
  if (!firstSortColumn) {
4397
4404
  firstSortColumn = column;
4398
4405
  }
4399
4406
  if (orders.indexOf(order) === -1) {
4400
- order = getNextSortOrder(_this42, column);
4407
+ order = getNextSortOrder(_this41, column);
4401
4408
  }
4402
4409
  if (column.order !== order) {
4403
4410
  column.order = order;
@@ -4501,7 +4508,7 @@ var Methods = {
4501
4508
  * 判断指定列是否为筛选状态,如果为空则判断所有列
4502
4509
  * @param {String} fieldOrColumn 字段名
4503
4510
  */
4504
- isFilter: function isFilter(fieldOrColumn) {
4511
+ isActiveFilterByColumn: function isActiveFilterByColumn(fieldOrColumn) {
4505
4512
  var column = (0, _util.handleFieldOrColumn)(this, fieldOrColumn);
4506
4513
  if (column) {
4507
4514
  return column.filters && column.filters.some(function (option) {
@@ -4510,6 +4517,10 @@ var Methods = {
4510
4517
  }
4511
4518
  return this.getCheckedFilters().length > 0;
4512
4519
  },
4520
+ // 已废弃
4521
+ isFilter: function isFilter(fieldOrColumn) {
4522
+ return this.isActiveFilterByColumn(fieldOrColumn);
4523
+ },
4513
4524
  /**
4514
4525
  * 判断展开行是否懒加载完成
4515
4526
  * @param {Row} row 行对象
@@ -4519,7 +4530,7 @@ var Methods = {
4519
4530
  return rest && rest.expandLoaded;
4520
4531
  },
4521
4532
  clearRowExpandLoaded: function clearRowExpandLoaded(row) {
4522
- var _this43 = this;
4533
+ var _this42 = this;
4523
4534
  var expandOpts = this.expandOpts,
4524
4535
  expandLazyLoadeds = this.expandLazyLoadeds,
4525
4536
  fullAllDataRowMap = this.fullAllDataRowMap;
@@ -4528,7 +4539,7 @@ var Methods = {
4528
4539
  if (lazy && rest) {
4529
4540
  rest.expandLoaded = false;
4530
4541
  _xeUtils["default"].remove(expandLazyLoadeds, function (item) {
4531
- return _this43.eqRow(item, row);
4542
+ return _this42.eqRow(item, row);
4532
4543
  });
4533
4544
  }
4534
4545
  return this.$nextTick();
@@ -4538,13 +4549,13 @@ var Methods = {
4538
4549
  * @param {Row} row 行对象
4539
4550
  */
4540
4551
  reloadRowExpand: function reloadRowExpand(row) {
4541
- var _this44 = this;
4552
+ var _this43 = this;
4542
4553
  var expandOpts = this.expandOpts,
4543
4554
  expandLazyLoadeds = this.expandLazyLoadeds;
4544
4555
  var lazy = expandOpts.lazy;
4545
4556
  if (lazy && this.findRowIndexOf(expandLazyLoadeds, row) === -1) {
4546
4557
  this.clearRowExpandLoaded(row).then(function () {
4547
- return _this44.handleAsyncRowExpand(row);
4558
+ return _this43.handleAsyncRowExpand(row);
4548
4559
  });
4549
4560
  }
4550
4561
  return this.$nextTick();
@@ -4615,25 +4626,25 @@ var Methods = {
4615
4626
  return this.setRowExpand(this.expandOpts.lazy ? this.tableData : this.tableFullData, expanded);
4616
4627
  },
4617
4628
  handleAsyncRowExpand: function handleAsyncRowExpand(row) {
4618
- var _this45 = this;
4629
+ var _this44 = this;
4619
4630
  var rest = this.fullAllDataRowMap.get(row);
4620
4631
  return new Promise(function (resolve) {
4621
- _this45.expandLazyLoadeds.push(row);
4622
- _this45.expandOpts.loadMethod({
4623
- $table: _this45,
4632
+ _this44.expandLazyLoadeds.push(row);
4633
+ _this44.expandOpts.loadMethod({
4634
+ $table: _this44,
4624
4635
  row: row,
4625
- rowIndex: _this45.getRowIndex(row),
4626
- $rowIndex: _this45.getVMRowIndex(row)
4636
+ rowIndex: _this44.getRowIndex(row),
4637
+ $rowIndex: _this44.getVMRowIndex(row)
4627
4638
  }).then(function () {
4628
4639
  rest.expandLoaded = true;
4629
- _this45.rowExpandeds.push(row);
4640
+ _this44.rowExpandeds.push(row);
4630
4641
  })["catch"](function () {
4631
4642
  rest.expandLoaded = false;
4632
4643
  })["finally"](function () {
4633
- _xeUtils["default"].remove(_this45.expandLazyLoadeds, function (item) {
4634
- return _this45.eqRow(item, row);
4644
+ _xeUtils["default"].remove(_this44.expandLazyLoadeds, function (item) {
4645
+ return _this44.eqRow(item, row);
4635
4646
  });
4636
- resolve(_this45.$nextTick().then(_this45.recalculate));
4647
+ resolve(_this44.$nextTick().then(_this44.recalculate));
4637
4648
  });
4638
4649
  });
4639
4650
  },
@@ -4645,7 +4656,7 @@ var Methods = {
4645
4656
  * @param {Boolean} expanded 是否展开
4646
4657
  */
4647
4658
  setRowExpand: function setRowExpand(rows, expanded) {
4648
- var _this46 = this;
4659
+ var _this45 = this;
4649
4660
  var fullAllDataRowMap = this.fullAllDataRowMap,
4650
4661
  expandLazyLoadeds = this.expandLazyLoadeds,
4651
4662
  expandOpts = this.expandOpts,
@@ -4674,17 +4685,17 @@ var Methods = {
4674
4685
  columnIndex: columnIndex,
4675
4686
  $columnIndex: $columnIndex,
4676
4687
  row: row,
4677
- rowIndex: _this46.getRowIndex(row),
4678
- $rowIndex: _this46.getVMRowIndex(row)
4688
+ rowIndex: _this45.getRowIndex(row),
4689
+ $rowIndex: _this45.getVMRowIndex(row)
4679
4690
  });
4680
4691
  }) : rows;
4681
4692
  if (expanded) {
4682
4693
  validRows.forEach(function (row) {
4683
- if (_this46.findRowIndexOf(rowExpandeds, row) === -1) {
4694
+ if (_this45.findRowIndexOf(rowExpandeds, row) === -1) {
4684
4695
  var rest = fullAllDataRowMap.get(row);
4685
- var isLoad = lazy && !rest.expandLoaded && _this46.findRowIndexOf(expandLazyLoadeds, row) === -1;
4696
+ var isLoad = lazy && !rest.expandLoaded && _this45.findRowIndexOf(expandLazyLoadeds, row) === -1;
4686
4697
  if (isLoad) {
4687
- lazyRests.push(_this46.handleAsyncRowExpand(row));
4698
+ lazyRests.push(_this45.handleAsyncRowExpand(row));
4688
4699
  } else {
4689
4700
  rowExpandeds.push(row);
4690
4701
  }
@@ -4692,12 +4703,12 @@ var Methods = {
4692
4703
  });
4693
4704
  } else {
4694
4705
  _xeUtils["default"].remove(rowExpandeds, function (row) {
4695
- return _this46.findRowIndexOf(validRows, row) > -1;
4706
+ return _this45.findRowIndexOf(validRows, row) > -1;
4696
4707
  });
4697
4708
  }
4698
4709
  if (reserve) {
4699
4710
  validRows.forEach(function (row) {
4700
- return _this46.handleRowExpandReserve(row, expanded);
4711
+ return _this45.handleRowExpandReserve(row, expanded);
4701
4712
  });
4702
4713
  }
4703
4714
  }
@@ -4716,7 +4727,7 @@ var Methods = {
4716
4727
  * 手动清空展开行状态,数据会恢复成未展开的状态
4717
4728
  */
4718
4729
  clearRowExpand: function clearRowExpand() {
4719
- var _this47 = this;
4730
+ var _this46 = this;
4720
4731
  var expandOpts = this.expandOpts,
4721
4732
  rowExpandeds = this.rowExpandeds,
4722
4733
  tableFullData = this.tableFullData;
@@ -4725,12 +4736,12 @@ var Methods = {
4725
4736
  this.rowExpandeds = [];
4726
4737
  if (reserve) {
4727
4738
  tableFullData.forEach(function (row) {
4728
- return _this47.handleRowExpandReserve(row, false);
4739
+ return _this46.handleRowExpandReserve(row, false);
4729
4740
  });
4730
4741
  }
4731
4742
  return this.$nextTick().then(function () {
4732
4743
  if (isExists) {
4733
- _this47.recalculate();
4744
+ _this46.recalculate();
4734
4745
  }
4735
4746
  });
4736
4747
  },
@@ -4800,7 +4811,7 @@ var Methods = {
4800
4811
  * @param {Row} row 行对象
4801
4812
  */
4802
4813
  reloadTreeExpand: function reloadTreeExpand(row) {
4803
- var _this48 = this;
4814
+ var _this47 = this;
4804
4815
  var treeOpts = this.treeOpts,
4805
4816
  treeLazyLoadeds = this.treeLazyLoadeds;
4806
4817
  var transform = treeOpts.transform,
@@ -4808,14 +4819,14 @@ var Methods = {
4808
4819
  hasChild = treeOpts.hasChild;
4809
4820
  if (lazy && row[hasChild] && treeLazyLoadeds.indexOf(row) === -1) {
4810
4821
  this.clearTreeExpandLoaded(row).then(function () {
4811
- return _this48.handleAsyncTreeExpandChilds(row);
4822
+ return _this47.handleAsyncTreeExpandChilds(row);
4812
4823
  }).then(function () {
4813
4824
  if (transform) {
4814
- _this48.handleVirtualTreeToList();
4815
- return _this48.handleTableData();
4825
+ _this47.handleVirtualTreeToList();
4826
+ return _this47.handleTableData();
4816
4827
  }
4817
4828
  }).then(function () {
4818
- return _this48.recalculate();
4829
+ return _this47.recalculate();
4819
4830
  });
4820
4831
  }
4821
4832
  return this.$nextTick();
@@ -4884,7 +4895,7 @@ var Methods = {
4884
4895
  }
4885
4896
  },
4886
4897
  handleAsyncTreeExpandChilds: function handleAsyncTreeExpandChilds(row) {
4887
- var _this49 = this;
4898
+ var _this48 = this;
4888
4899
  var fullAllDataRowMap = this.fullAllDataRowMap,
4889
4900
  treeExpandeds = this.treeExpandeds,
4890
4901
  treeOpts = this.treeOpts,
@@ -4897,7 +4908,7 @@ var Methods = {
4897
4908
  return new Promise(function (resolve) {
4898
4909
  treeLazyLoadeds.push(row);
4899
4910
  loadMethod({
4900
- $table: _this49,
4911
+ $table: _this48,
4901
4912
  row: row
4902
4913
  }).then(function (childRecords) {
4903
4914
  // 响应成功后则展开行,并将子节点挂载到该节点下
@@ -4909,17 +4920,17 @@ var Methods = {
4909
4920
  childRecords = [];
4910
4921
  }
4911
4922
  if (childRecords) {
4912
- return _this49.loadTreeChildren(row, childRecords).then(function (childRows) {
4923
+ return _this48.loadTreeChildren(row, childRecords).then(function (childRows) {
4913
4924
  if (childRows.length && treeExpandeds.indexOf(row) === -1) {
4914
4925
  treeExpandeds.push(row);
4915
4926
  }
4916
4927
  // 如果当前节点已选中,则展开后子节点也被选中
4917
- if (!checkStrictly && _this49.isCheckedByCheckboxRow(row)) {
4918
- _this49.handleCheckedCheckboxRow(childRows, true, true);
4928
+ if (!checkStrictly && _this48.isCheckedByCheckboxRow(row)) {
4929
+ _this48.handleCheckedCheckboxRow(childRows, true, true);
4919
4930
  }
4920
- return _this49.$nextTick().then(function () {
4931
+ return _this48.$nextTick().then(function () {
4921
4932
  if (transform) {
4922
- return _this49.handleTableData();
4933
+ return _this48.handleTableData();
4923
4934
  }
4924
4935
  });
4925
4936
  });
@@ -4931,8 +4942,8 @@ var Methods = {
4931
4942
  return item === row;
4932
4943
  });
4933
4944
  })["finally"](function () {
4934
- _this49.$nextTick().then(function () {
4935
- return _this49.recalculate();
4945
+ _this48.$nextTick().then(function () {
4946
+ return _this48.recalculate();
4936
4947
  }).then(function () {
4937
4948
  return resolve();
4938
4949
  });
@@ -4964,7 +4975,7 @@ var Methods = {
4964
4975
  * @returns
4965
4976
  */
4966
4977
  handleBaseTreeExpand: function handleBaseTreeExpand(rows, expanded) {
4967
- var _this50 = this;
4978
+ var _this49 = this;
4968
4979
  var fullAllDataRowMap = this.fullAllDataRowMap,
4969
4980
  tableFullData = this.tableFullData,
4970
4981
  treeExpandeds = this.treeExpandeds,
@@ -5008,7 +5019,7 @@ var Methods = {
5008
5019
  var isLoad = lazy && row[hasChild] && !rest.treeLoaded && treeLazyLoadeds.indexOf(row) === -1;
5009
5020
  // 是否使用懒加载
5010
5021
  if (isLoad) {
5011
- result.push(_this50.handleAsyncTreeExpandChilds(row));
5022
+ result.push(_this49.handleAsyncTreeExpandChilds(row));
5012
5023
  } else {
5013
5024
  if (row[children] && row[children].length) {
5014
5025
  treeExpandeds.push(row);
@@ -5023,7 +5034,7 @@ var Methods = {
5023
5034
  }
5024
5035
  if (reserve) {
5025
5036
  validRows.forEach(function (row) {
5026
- return _this50.handleTreeExpandReserve(row, expanded);
5037
+ return _this49.handleTreeExpandReserve(row, expanded);
5027
5038
  });
5028
5039
  }
5029
5040
  return Promise.all(result).then(this.recalculate);
@@ -5035,12 +5046,12 @@ var Methods = {
5035
5046
  * @returns
5036
5047
  */
5037
5048
  handleVirtualTreeExpand: function handleVirtualTreeExpand(rows, expanded) {
5038
- var _this51 = this;
5049
+ var _this50 = this;
5039
5050
  return this.handleBaseTreeExpand(rows, expanded).then(function () {
5040
- _this51.handleVirtualTreeToList();
5041
- return _this51.handleTableData();
5051
+ _this50.handleVirtualTreeToList();
5052
+ return _this50.handleTableData();
5042
5053
  }).then(function () {
5043
- return _this51.recalculate();
5054
+ return _this50.recalculate();
5044
5055
  });
5045
5056
  },
5046
5057
  /**
@@ -5079,7 +5090,7 @@ var Methods = {
5079
5090
  * 手动清空树形节点的展开状态,数据会恢复成未展开的状态
5080
5091
  */
5081
5092
  clearTreeExpand: function clearTreeExpand() {
5082
- var _this52 = this;
5093
+ var _this51 = this;
5083
5094
  var treeOpts = this.treeOpts,
5084
5095
  treeExpandeds = this.treeExpandeds,
5085
5096
  tableFullData = this.tableFullData;
@@ -5089,17 +5100,17 @@ var Methods = {
5089
5100
  this.treeExpandeds = [];
5090
5101
  if (reserve) {
5091
5102
  _xeUtils["default"].eachTree(tableFullData, function (row) {
5092
- return _this52.handleTreeExpandReserve(row, false);
5103
+ return _this51.handleTreeExpandReserve(row, false);
5093
5104
  }, treeOpts);
5094
5105
  }
5095
5106
  return this.handleTableData().then(function () {
5096
5107
  if (transform) {
5097
- _this52.handleVirtualTreeToList();
5098
- return _this52.handleTableData();
5108
+ _this51.handleVirtualTreeToList();
5109
+ return _this51.handleTableData();
5099
5110
  }
5100
5111
  }).then(function () {
5101
5112
  if (isExists) {
5102
- _this52.recalculate();
5113
+ _this51.recalculate();
5103
5114
  }
5104
5115
  });
5105
5116
  },
@@ -5218,28 +5229,28 @@ var Methods = {
5218
5229
  },
5219
5230
  // 计算可视渲染相关数据
5220
5231
  computeScrollLoad: function computeScrollLoad() {
5221
- var _this53 = this;
5232
+ var _this52 = this;
5222
5233
  return this.$nextTick().then(function () {
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;
5234
+ var sYOpts = _this52.sYOpts,
5235
+ sXOpts = _this52.sXOpts,
5236
+ scrollXLoad = _this52.scrollXLoad,
5237
+ scrollYLoad = _this52.scrollYLoad,
5238
+ scrollXStore = _this52.scrollXStore,
5239
+ scrollYStore = _this52.scrollYStore;
5229
5240
  // 计算 X 逻辑
5230
5241
  if (scrollXLoad) {
5231
- var _computeVirtualX3 = computeVirtualX(_this53),
5242
+ var _computeVirtualX3 = computeVirtualX(_this52),
5232
5243
  visibleXSize = _computeVirtualX3.visibleSize;
5233
5244
  var offsetXSize = sXOpts.oSize ? _xeUtils["default"].toNumber(sXOpts.oSize) : _dom.browse.msie ? 10 : _dom.browse.edge ? 5 : 0;
5234
5245
  scrollXStore.offsetSize = offsetXSize;
5235
5246
  scrollXStore.visibleSize = visibleXSize;
5236
5247
  scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
5237
- _this53.updateScrollXData();
5248
+ _this52.updateScrollXData();
5238
5249
  } else {
5239
- _this53.updateScrollXSpace();
5250
+ _this52.updateScrollXSpace();
5240
5251
  }
5241
5252
  // 计算 Y 逻辑
5242
- var _computeVirtualY = computeVirtualY(_this53),
5253
+ var _computeVirtualY = computeVirtualY(_this52),
5243
5254
  rowHeight = _computeVirtualY.rowHeight,
5244
5255
  visibleYSize = _computeVirtualY.visibleSize;
5245
5256
  scrollYStore.rowHeight = rowHeight;
@@ -5248,12 +5259,12 @@ var Methods = {
5248
5259
  scrollYStore.offsetSize = offsetYSize;
5249
5260
  scrollYStore.visibleSize = visibleYSize;
5250
5261
  scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
5251
- _this53.updateScrollYData();
5262
+ _this52.updateScrollYData();
5252
5263
  } else {
5253
- _this53.updateScrollYSpace();
5264
+ _this52.updateScrollYSpace();
5254
5265
  }
5255
- _this53.rowHeight = rowHeight;
5256
- _this53.$nextTick(_this53.updateStyle);
5266
+ _this52.rowHeight = rowHeight;
5267
+ _this52.$nextTick(_this52.updateStyle);
5257
5268
  });
5258
5269
  },
5259
5270
  handleTableColumn: function handleTableColumn() {
@@ -5263,11 +5274,11 @@ var Methods = {
5263
5274
  this.tableColumn = scrollXLoad ? visibleColumn.slice(scrollXStore.startIndex, scrollXStore.endIndex) : visibleColumn.slice(0);
5264
5275
  },
5265
5276
  updateScrollXData: function updateScrollXData() {
5266
- var _this54 = this;
5277
+ var _this53 = this;
5267
5278
  // this.tableColumn = []
5268
5279
  this.$nextTick(function () {
5269
- _this54.handleTableColumn();
5270
- _this54.updateScrollXSpace();
5280
+ _this53.handleTableColumn();
5281
+ _this53.updateScrollXSpace();
5271
5282
  });
5272
5283
  },
5273
5284
  // 更新横向 X 可视渲染上下剩余空间大小
@@ -5318,11 +5329,11 @@ var Methods = {
5318
5329
  }
5319
5330
  },
5320
5331
  updateScrollYData: function updateScrollYData() {
5321
- var _this55 = this;
5332
+ var _this54 = this;
5322
5333
  // this.tableData = []
5323
5334
  this.$nextTick(function () {
5324
- _this55.handleTableData();
5325
- _this55.updateScrollYSpace();
5335
+ _this54.handleTableData();
5336
+ _this54.updateScrollYSpace();
5326
5337
  });
5327
5338
  },
5328
5339
  // 更新纵向 Y 可视渲染上下剩余空间大小
@@ -5363,7 +5374,7 @@ var Methods = {
5363
5374
  * @param {Number} scrollTop 上距离
5364
5375
  */
5365
5376
  scrollTo: function scrollTo(scrollLeft, scrollTop) {
5366
- var _this56 = this;
5377
+ var _this55 = this;
5367
5378
  var $refs = this.$refs;
5368
5379
  var tableBody = $refs.tableBody,
5369
5380
  rightBody = $refs.rightBody,
@@ -5380,7 +5391,7 @@ var Methods = {
5380
5391
  if (this.scrollXLoad || this.scrollYLoad) {
5381
5392
  return new Promise(function (resolve) {
5382
5393
  return setTimeout(function () {
5383
- return resolve(_this56.$nextTick());
5394
+ return resolve(_this55.$nextTick());
5384
5395
  }, 50);
5385
5396
  });
5386
5397
  }
@@ -5422,7 +5433,7 @@ var Methods = {
5422
5433
  * @param {Row} row 行对象
5423
5434
  */
5424
5435
  scrollToTreeRow: function scrollToTreeRow(row) {
5425
- var _this57 = this;
5436
+ var _this56 = this;
5426
5437
  var tableFullData = this.tableFullData,
5427
5438
  treeConfig = this.treeConfig,
5428
5439
  treeOpts = this.treeOpts;
@@ -5434,14 +5445,14 @@ var Methods = {
5434
5445
  if (matchObj) {
5435
5446
  var nodes = matchObj.nodes;
5436
5447
  nodes.forEach(function (row, index) {
5437
- if (index < nodes.length - 1 && !_this57.isTreeExpandByRow(row)) {
5438
- rests.push(_this57.setTreeExpand(row, true));
5448
+ if (index < nodes.length - 1 && !_this56.isTreeExpandByRow(row)) {
5449
+ rests.push(_this56.setTreeExpand(row, true));
5439
5450
  }
5440
5451
  });
5441
5452
  }
5442
5453
  }
5443
5454
  return Promise.all(rests).then(function () {
5444
- return (0, _util.rowToVisible)(_this57, row);
5455
+ return (0, _util.rowToVisible)(_this56, row);
5445
5456
  });
5446
5457
  },
5447
5458
  /**
@@ -5496,30 +5507,30 @@ var Methods = {
5496
5507
  * 如果单元格配置了校验规则,则会进行校验
5497
5508
  */
5498
5509
  updateStatus: function updateStatus(scope, cellValue) {
5499
- var _this58 = this;
5510
+ var _this57 = this;
5500
5511
  var customVal = !_xeUtils["default"].isUndefined(cellValue);
5501
5512
  return this.$nextTick().then(function () {
5502
- var $refs = _this58.$refs,
5503
- editRules = _this58.editRules,
5504
- validStore = _this58.validStore;
5513
+ var $refs = _this57.$refs,
5514
+ editRules = _this57.editRules,
5515
+ validStore = _this57.validStore;
5505
5516
  if (scope && $refs.tableBody && editRules) {
5506
5517
  var row = scope.row,
5507
5518
  column = scope.column;
5508
5519
  var type = 'change';
5509
- if (_this58.hasCellRules(type, row, column)) {
5510
- var cell = _this58.getCell(row, column);
5520
+ if (_this57.hasCellRules(type, row, column)) {
5521
+ var cell = _this57.getCell(row, column);
5511
5522
  if (cell) {
5512
- return _this58.validCellRules(type, row, column, cellValue).then(function () {
5523
+ return _this57.validCellRules(type, row, column, cellValue).then(function () {
5513
5524
  if (customVal && validStore.visible) {
5514
5525
  setCellValue(row, column, cellValue);
5515
5526
  }
5516
- _this58.clearValidate();
5527
+ _this57.clearValidate();
5517
5528
  })["catch"](function (_ref8) {
5518
5529
  var rule = _ref8.rule;
5519
5530
  if (customVal) {
5520
5531
  setCellValue(row, column, cellValue);
5521
5532
  }
5522
- _this58.showValidTooltip({
5533
+ _this57.showValidTooltip({
5523
5534
  rule: rule,
5524
5535
  row: row,
5525
5536
  column: column,
@@ -5539,13 +5550,13 @@ var Methods = {
5539
5550
  * @param {TableMergeConfig[]} merges { row: Row|number, column: ColumnInfo|number, rowspan: number, colspan: number }
5540
5551
  */
5541
5552
  setMergeCells: function setMergeCells(merges) {
5542
- var _this59 = this;
5553
+ var _this58 = this;
5543
5554
  if (this.spanMethod) {
5544
5555
  (0, _log.errLog)('vxe.error.errConflicts', ['merge-cells', 'span-method']);
5545
5556
  }
5546
5557
  setMerges(this, merges, this.mergeList, this.afterFullData);
5547
5558
  return this.$nextTick().then(function () {
5548
- return _this59.updateCellAreas();
5559
+ return _this58.updateCellAreas();
5549
5560
  });
5550
5561
  },
5551
5562
  /**
@@ -5553,13 +5564,13 @@ var Methods = {
5553
5564
  * @param {TableMergeConfig[]} merges 多个或数组 [{row:Row|number, col:ColumnInfo|number}]
5554
5565
  */
5555
5566
  removeMergeCells: function removeMergeCells(merges) {
5556
- var _this60 = this;
5567
+ var _this59 = this;
5557
5568
  if (this.spanMethod) {
5558
5569
  (0, _log.errLog)('vxe.error.errConflicts', ['merge-cells', 'span-method']);
5559
5570
  }
5560
5571
  var rest = removeMerges(this, merges, this.mergeList, this.afterFullData);
5561
5572
  return this.$nextTick().then(function () {
5562
- _this60.updateCellAreas();
5573
+ _this59.updateCellAreas();
5563
5574
  return rest;
5564
5575
  });
5565
5576
  },
@@ -5580,23 +5591,23 @@ var Methods = {
5580
5591
  this.setMergeFooterItems(this.mergeFooterItems);
5581
5592
  },
5582
5593
  setMergeFooterItems: function setMergeFooterItems(merges) {
5583
- var _this61 = this;
5594
+ var _this60 = this;
5584
5595
  if (this.footerSpanMethod) {
5585
5596
  (0, _log.errLog)('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
5586
5597
  }
5587
5598
  setMerges(this, merges, this.mergeFooterList, null);
5588
5599
  return this.$nextTick().then(function () {
5589
- return _this61.updateCellAreas();
5600
+ return _this60.updateCellAreas();
5590
5601
  });
5591
5602
  },
5592
5603
  removeMergeFooterItems: function removeMergeFooterItems(merges) {
5593
- var _this62 = this;
5604
+ var _this61 = this;
5594
5605
  if (this.footerSpanMethod) {
5595
5606
  (0, _log.errLog)('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
5596
5607
  }
5597
5608
  var rest = removeMerges(this, merges, this.mergeFooterList, null);
5598
5609
  return this.$nextTick().then(function () {
5599
- _this62.updateCellAreas();
5610
+ _this61.updateCellAreas();
5600
5611
  return rest;
5601
5612
  });
5602
5613
  },
@@ -5713,9 +5724,9 @@ var Methods = {
5713
5724
  return cellLabel;
5714
5725
  },
5715
5726
  findRowIndexOf: function findRowIndexOf(list, row) {
5716
- var _this63 = this;
5727
+ var _this62 = this;
5717
5728
  return row ? _xeUtils["default"].findIndexOf(list, function (item) {
5718
- return _this63.eqRow(item, row);
5729
+ return _this62.eqRow(item, row);
5719
5730
  }) : -1;
5720
5731
  },
5721
5732
  eqRow: function eqRow(row1, row2) {