vxe-table 3.4.14-beta.1 → 3.4.15

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 (45) hide show
  1. package/README.md +1 -5
  2. package/lib/filter/src/mixin.js +24 -13
  3. package/lib/filter/src/mixin.min.js +1 -1
  4. package/lib/form/src/form-item.js +5 -0
  5. package/lib/form/src/form-item.min.js +1 -1
  6. package/lib/form/src/form.js +31 -27
  7. package/lib/form/src/form.min.js +1 -1
  8. package/lib/form/src/util.js +11 -0
  9. package/lib/form/src/util.min.js +1 -1
  10. package/lib/index.umd.js +591 -1272
  11. package/lib/index.umd.min.js +1 -1
  12. package/lib/input/src/date.js +54 -0
  13. package/lib/input/src/date.min.js +1 -0
  14. package/lib/input/src/input.js +12 -59
  15. package/lib/input/src/input.min.js +1 -1
  16. package/lib/input/src/number.js +23 -0
  17. package/lib/input/src/number.min.js +1 -0
  18. package/lib/pager/src/pager.js +15 -1
  19. package/lib/pager/src/pager.min.js +1 -1
  20. package/lib/table/src/body.js +35 -12
  21. package/lib/table/src/body.min.js +1 -1
  22. package/lib/table/src/methods.js +356 -304
  23. package/lib/table/src/methods.min.js +1 -1
  24. package/lib/tools/src/dom.js +12 -1
  25. package/lib/tools/src/dom.min.js +1 -1
  26. package/lib/tooltip/src/tooltip.js +81 -44
  27. package/lib/tooltip/src/tooltip.min.js +1 -1
  28. package/lib/v-x-e-table/src/conf.js +1 -0
  29. package/lib/v-x-e-table/src/conf.min.js +1 -1
  30. package/package.json +3 -3
  31. package/packages/filter/src/mixin.js +17 -10
  32. package/packages/form/src/form-item.js +5 -0
  33. package/packages/form/src/form.js +22 -16
  34. package/packages/form/src/util.js +7 -0
  35. package/packages/input/src/date.js +38 -0
  36. package/packages/input/src/input.js +4 -46
  37. package/packages/input/src/number.js +12 -0
  38. package/packages/pager/src/pager.js +15 -1
  39. package/packages/table/src/body.js +31 -13
  40. package/packages/table/src/methods.js +63 -26
  41. package/packages/tools/src/dom.js +13 -1
  42. package/packages/tooltip/src/tooltip.js +47 -23
  43. package/packages/v-x-e-table/src/conf.js +1 -0
  44. package/README.en.md +0 -170
  45. package/README.zh-TW.md +0 -174
@@ -52,7 +52,8 @@ var calcHeight = _tools.DomTools.calcHeight,
52
52
  hasClass = _tools.DomTools.hasClass,
53
53
  addClass = _tools.DomTools.addClass,
54
54
  removeClass = _tools.DomTools.removeClass,
55
- getEventTargetNode = _tools.DomTools.getEventTargetNode;
55
+ getEventTargetNode = _tools.DomTools.getEventTargetNode,
56
+ isNodeElement = _tools.DomTools.isNodeElement;
56
57
  var isWebkit = _dom.browse['-webkit'] && !_dom.browse.edge;
57
58
  var debounceScrollYDuration = _dom.browse.msie ? 80 : 20;
58
59
  var resizableStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_WIDTH';
@@ -432,14 +433,43 @@ var Methods = {
432
433
  },
433
434
 
434
435
  /**
435
- * 手动处理数据
436
+ * 手动处理数据,用于手动排序与筛选
436
437
  * 对于手动更改了排序、筛选...等条件后需要重新处理数据时可能会用到
437
438
  */
438
439
  updateData: function updateData() {
439
- return this.handleTableData(true).then(this.updateFooter).then(this.recalculate);
440
+ var _this2 = this;
441
+
442
+ var scrollXLoad = this.scrollXLoad,
443
+ scrollYLoad = this.scrollYLoad;
444
+ return this.handleTableData(true).then(function () {
445
+ _this2.updateFooter();
446
+
447
+ _this2.checkSelectionStatus();
448
+
449
+ if (scrollXLoad || scrollYLoad) {
450
+ if (scrollXLoad) {
451
+ _this2.updateScrollXSpace();
452
+ }
453
+
454
+ if (scrollYLoad) {
455
+ _this2.updateScrollYSpace();
456
+ }
457
+
458
+ return _this2.refreshScroll();
459
+ }
460
+ }).then(function () {
461
+ _this2.updateCellAreas();
462
+
463
+ return _this2.recalculate(true);
464
+ }).then(function () {
465
+ // 存在滚动行为未结束情况
466
+ setTimeout(function () {
467
+ return _this2.recalculate();
468
+ }, 50);
469
+ });
440
470
  },
441
471
  handleTableData: function handleTableData(force) {
442
- var _this2 = this;
472
+ var _this3 = this;
443
473
 
444
474
  var scrollYLoad = this.scrollYLoad,
445
475
  scrollYStore = this.scrollYStore,
@@ -456,7 +486,7 @@ var Methods = {
456
486
 
457
487
  var tableData = scrollYLoad ? fullList.slice(scrollYStore.startIndex, scrollYStore.endIndex) : fullList.slice(0);
458
488
  tableData.forEach(function (row, $index) {
459
- var rowid = getRowid(_this2, row);
489
+ var rowid = getRowid(_this3, row);
460
490
  var rest = fullDataRowIdData[rowid];
461
491
 
462
492
  if (rest) {
@@ -481,7 +511,7 @@ var Methods = {
481
511
  * @param {Array} datas 数据
482
512
  */
483
513
  loadTableData: function loadTableData(datas) {
484
- var _this3 = this;
514
+ var _this4 = this;
485
515
 
486
516
  var keepSource = this.keepSource,
487
517
  treeConfig = this.treeConfig,
@@ -584,31 +614,31 @@ var Methods = {
584
614
  this.handleTableData(true);
585
615
  this.updateFooter();
586
616
  return this.$nextTick().then(function () {
587
- _this3.updateHeight();
617
+ _this4.updateHeight();
588
618
 
589
- _this3.updateStyle();
619
+ _this4.updateStyle();
590
620
  }).then(function () {
591
- _this3.computeScrollLoad();
621
+ _this4.computeScrollLoad();
592
622
  }).then(function () {
593
623
  // 是否启用了虚拟滚动
594
624
  if (sYLoad) {
595
625
  scrollYStore.endIndex = scrollYStore.visibleSize;
596
626
  }
597
627
 
598
- _this3.handleReserveStatus();
628
+ _this4.handleReserveStatus();
599
629
 
600
- _this3.checkSelectionStatus();
630
+ _this4.checkSelectionStatus();
601
631
 
602
632
  return new Promise(function (resolve) {
603
- _this3.$nextTick().then(function () {
604
- return _this3.recalculate();
633
+ _this4.$nextTick().then(function () {
634
+ return _this4.recalculate();
605
635
  }).then(function () {
606
636
  // 是否变更虚拟滚动
607
637
  if (oldScrollYLoad === sYLoad) {
608
- (0, _util.restoreScrollLocation)(_this3, lastScrollLeft, lastScrollTop).then(resolve);
638
+ (0, _util.restoreScrollLocation)(_this4, lastScrollLeft, lastScrollTop).then(resolve);
609
639
  } else {
610
640
  setTimeout(function () {
611
- return (0, _util.restoreScrollLocation)(_this3, lastScrollLeft, lastScrollTop).then(resolve);
641
+ return (0, _util.restoreScrollLocation)(_this4, lastScrollLeft, lastScrollTop).then(resolve);
612
642
  });
613
643
  }
614
644
  });
@@ -621,23 +651,23 @@ var Methods = {
621
651
  * @param {Array} datas 数据
622
652
  */
623
653
  loadData: function loadData(datas) {
624
- var _this4 = this;
654
+ var _this5 = this;
625
655
 
626
656
  var inited = this.inited,
627
657
  initStatus = this.initStatus;
628
658
  return this.loadTableData(datas).then(function () {
629
- _this4.inited = true;
630
- _this4.initStatus = true;
659
+ _this5.inited = true;
660
+ _this5.initStatus = true;
631
661
 
632
662
  if (!initStatus) {
633
- _this4.handleLoadDefaults();
663
+ _this5.handleLoadDefaults();
634
664
  }
635
665
 
636
666
  if (!inited) {
637
- _this4.handleInitDefaults();
667
+ _this5.handleInitDefaults();
638
668
  }
639
669
 
640
- return _this4.recalculate();
670
+ return _this5.recalculate();
641
671
  });
642
672
  },
643
673
 
@@ -646,21 +676,21 @@ var Methods = {
646
676
  * @param {Array} datas 数据
647
677
  */
648
678
  reloadData: function reloadData(datas) {
649
- var _this5 = this;
679
+ var _this6 = this;
650
680
 
651
681
  var inited = this.inited;
652
682
  return this.clearAll().then(function () {
653
- _this5.inited = true;
654
- _this5.initStatus = true;
655
- return _this5.loadTableData(datas);
683
+ _this6.inited = true;
684
+ _this6.initStatus = true;
685
+ return _this6.loadTableData(datas);
656
686
  }).then(function () {
657
- _this5.handleLoadDefaults();
687
+ _this6.handleLoadDefaults();
658
688
 
659
689
  if (!inited) {
660
- _this5.handleInitDefaults();
690
+ _this6.handleInitDefaults();
661
691
  }
662
692
 
663
- return _this5.recalculate();
693
+ return _this6.recalculate();
664
694
  });
665
695
  },
666
696
 
@@ -710,10 +740,10 @@ var Methods = {
710
740
  * @param {ColumnInfo} columns 列配置
711
741
  */
712
742
  loadColumn: function loadColumn(columns) {
713
- var _this6 = this;
743
+ var _this7 = this;
714
744
 
715
745
  var collectColumn = _xeUtils.default.mapTree(columns, function (column) {
716
- return _cell.default.createColumn(_this6, column);
746
+ return _cell.default.createColumn(_this7, column);
717
747
  }, {
718
748
  children: 'children'
719
749
  });
@@ -727,14 +757,14 @@ var Methods = {
727
757
  * @param {ColumnInfo} columns 列配置
728
758
  */
729
759
  reloadColumn: function reloadColumn(columns) {
730
- var _this7 = this;
760
+ var _this8 = this;
731
761
 
732
762
  return this.clearAll().then(function () {
733
- return _this7.loadColumn(columns);
763
+ return _this8.loadColumn(columns);
734
764
  });
735
765
  },
736
766
  handleColumn: function handleColumn(collectColumn) {
737
- var _this8 = this;
767
+ var _this9 = this;
738
768
 
739
769
  this.collectColumn = collectColumn;
740
770
  var tableFullColumn = getColumnList(collectColumn);
@@ -742,8 +772,8 @@ var Methods = {
742
772
  this.cacheColumnMap();
743
773
  this.restoreCustomStorage();
744
774
  this.parseColumns().then(function () {
745
- if (_this8.scrollXLoad) {
746
- _this8.loadScrollXData(true);
775
+ if (_this9.scrollXLoad) {
776
+ _this9.loadScrollXData(true);
747
777
  }
748
778
  });
749
779
  this.clearMergeCells();
@@ -757,14 +787,14 @@ var Methods = {
757
787
  }
758
788
 
759
789
  return this.$nextTick().then(function () {
760
- if (_this8.$toolbar) {
761
- _this8.$toolbar.syncUpdate({
790
+ if (_this9.$toolbar) {
791
+ _this9.$toolbar.syncUpdate({
762
792
  collectColumn: collectColumn,
763
- $table: _this8
793
+ $table: _this9
764
794
  });
765
795
  }
766
796
 
767
- return _this8.recalculate();
797
+ return _this9.recalculate();
768
798
  });
769
799
  },
770
800
 
@@ -773,7 +803,7 @@ var Methods = {
773
803
  * 牺牲数据组装的耗时,用来换取使用过程中的流畅
774
804
  */
775
805
  cacheRowMap: function cacheRowMap(source) {
776
- var _this9 = this;
806
+ var _this10 = this;
777
807
 
778
808
  var treeConfig = this.treeConfig,
779
809
  treeOpts = this.treeOpts,
@@ -787,7 +817,7 @@ var Methods = {
787
817
  var isLazy = treeConfig && treeOpts.lazy;
788
818
 
789
819
  var handleCache = function handleCache(row, index, items, path, parent, nodes) {
790
- var rowid = getRowid(_this9, row);
820
+ var rowid = getRowid(_this10, row);
791
821
  var seq = treeConfig && path ? (0, _util.toTreePathSeq)(path) : index + 1;
792
822
  var level = nodes ? nodes.length - 1 : 0;
793
823
 
@@ -837,7 +867,7 @@ var Methods = {
837
867
  }
838
868
  },
839
869
  loadTreeChildren: function loadTreeChildren(row, childRecords) {
840
- var _this10 = this;
870
+ var _this11 = this;
841
871
 
842
872
  var keepSource = this.keepSource,
843
873
  tableSourceData = this.tableSourceData,
@@ -853,10 +883,10 @@ var Methods = {
853
883
  var parentLevel = rest ? rest.level : 0;
854
884
  return this.createData(childRecords).then(function (rows) {
855
885
  if (keepSource) {
856
- var rowid = getRowid(_this10, row);
886
+ var rowid = getRowid(_this11, row);
857
887
 
858
888
  var matchObj = _xeUtils.default.findTree(tableSourceData, function (item) {
859
- return rowid === getRowid(_this10, item);
889
+ return rowid === getRowid(_this11, item);
860
890
  }, treeOpts);
861
891
 
862
892
  if (matchObj) {
@@ -865,7 +895,7 @@ var Methods = {
865
895
  }
866
896
 
867
897
  _xeUtils.default.eachTree(rows, function (childRow, index, items, path, parent, nodes) {
868
- var rowid = getRowid(_this10, childRow);
898
+ var rowid = getRowid(_this11, childRow);
869
899
  var rest = {
870
900
  row: childRow,
871
901
  rowid: rowid,
@@ -889,7 +919,7 @@ var Methods = {
889
919
  row[mapChildren] = rows;
890
920
  }
891
921
 
892
- _this10.updateAfterDataIndex();
922
+ _this11.updateAfterDataIndex();
893
923
 
894
924
  return rows;
895
925
  });
@@ -900,7 +930,7 @@ var Methods = {
900
930
  * 牺牲数据组装的耗时,用来换取使用过程中的流畅
901
931
  */
902
932
  cacheColumnMap: function cacheColumnMap() {
903
- var _this11 = this;
933
+ var _this12 = this;
904
934
 
905
935
  var tableFullColumn = this.tableFullColumn,
906
936
  collectColumn = this.collectColumn,
@@ -987,16 +1017,16 @@ var Methods = {
987
1017
  }
988
1018
 
989
1019
  if (process.env.NODE_ENV === 'development') {
990
- if (_this11.showOverflow && column.showOverflow === false) {
991
- _tools.UtilTools.warn('vxe.error.errConflicts', ["table.show-overflow=".concat(_this11.showOverflow), "column.show-overflow=".concat(column.showOverflow)]);
1020
+ if (_this12.showOverflow && column.showOverflow === false) {
1021
+ _tools.UtilTools.warn('vxe.error.errConflicts', ["table.show-overflow=".concat(_this12.showOverflow), "column.show-overflow=".concat(column.showOverflow)]);
992
1022
  }
993
1023
 
994
- if (_this11.showHeaderOverflow && column.showHeaderOverflow === false) {
995
- _tools.UtilTools.warn('vxe.error.errConflicts', ["table.show-header-overflow=".concat(_this11.showHeaderOverflow), "column.show-header-overflow=".concat(column.showHeaderOverflow)]);
1024
+ if (_this12.showHeaderOverflow && column.showHeaderOverflow === false) {
1025
+ _tools.UtilTools.warn('vxe.error.errConflicts', ["table.show-header-overflow=".concat(_this12.showHeaderOverflow), "column.show-header-overflow=".concat(column.showHeaderOverflow)]);
996
1026
  }
997
1027
 
998
- if (_this11.showFooterOverflow && column.showFooterOverflow === false) {
999
- _tools.UtilTools.warn('vxe.error.errConflicts', ["table.show-footer-overflow=".concat(_this11.showFooterOverflow), "column.show-footer-overflow=".concat(column.showFooterOverflow)]);
1028
+ if (_this12.showFooterOverflow && column.showFooterOverflow === false) {
1029
+ _tools.UtilTools.warn('vxe.error.errConflicts', ["table.show-footer-overflow=".concat(_this12.showFooterOverflow), "column.show-footer-overflow=".concat(column.showFooterOverflow)]);
1000
1030
  }
1001
1031
  }
1002
1032
 
@@ -1248,13 +1278,13 @@ var Methods = {
1248
1278
  * @param {Array} records 新数据
1249
1279
  */
1250
1280
  createData: function createData(records) {
1251
- var _this12 = this;
1281
+ var _this13 = this;
1252
1282
 
1253
1283
  var treeConfig = this.treeConfig,
1254
1284
  treeOpts = this.treeOpts;
1255
1285
 
1256
1286
  var handleRrecord = function handleRrecord(record) {
1257
- return _this12.defineField(Object.assign({}, record));
1287
+ return _this13.defineField(Object.assign({}, record));
1258
1288
  };
1259
1289
 
1260
1290
  var rows = treeConfig ? _xeUtils.default.mapTree(records, handleRrecord, treeOpts) : records.map(handleRrecord);
@@ -1269,7 +1299,7 @@ var Methods = {
1269
1299
  * @param {Array/Object} records 新数据
1270
1300
  */
1271
1301
  createRow: function createRow(records) {
1272
- var _this13 = this;
1302
+ var _this14 = this;
1273
1303
 
1274
1304
  var isArr = _xeUtils.default.isArray(records);
1275
1305
 
@@ -1278,7 +1308,7 @@ var Methods = {
1278
1308
  }
1279
1309
 
1280
1310
  return this.$nextTick().then(function () {
1281
- return _this13.createData(records).then(function (rows) {
1311
+ return _this14.createData(records).then(function (rows) {
1282
1312
  return isArr ? rows : rows[0];
1283
1313
  });
1284
1314
  });
@@ -1292,7 +1322,7 @@ var Methods = {
1292
1322
  * 如果还额外传了 field 则还原指定的单元格数据
1293
1323
  */
1294
1324
  revertData: function revertData(rows, field) {
1295
- var _this14 = this;
1325
+ var _this15 = this;
1296
1326
 
1297
1327
  var keepSource = this.keepSource,
1298
1328
  tableSourceData = this.tableSourceData,
@@ -1318,8 +1348,8 @@ var Methods = {
1318
1348
 
1319
1349
  if (targetRows.length) {
1320
1350
  targetRows.forEach(function (row) {
1321
- if (!_this14.isInsertByRow(row)) {
1322
- var rowIndex = _this14.getRowIndex(row);
1351
+ if (!_this15.isInsertByRow(row)) {
1352
+ var rowIndex = _this15.getRowIndex(row);
1323
1353
 
1324
1354
  if (treeConfig && rowIndex === -1) {
1325
1355
  throw new Error(_tools.UtilTools.getLog('vxe.error.noTree', ['revertData']));
@@ -1403,7 +1433,7 @@ var Methods = {
1403
1433
  * @param {String} field 字段名
1404
1434
  */
1405
1435
  isUpdateByRow: function isUpdateByRow(row, field) {
1406
- var _this15 = this;
1436
+ var _this16 = this;
1407
1437
 
1408
1438
  var visibleColumn = this.visibleColumn,
1409
1439
  keepSource = this.keepSource,
@@ -1424,7 +1454,7 @@ var Methods = {
1424
1454
  var children = treeOpts.children;
1425
1455
 
1426
1456
  var matchObj = _xeUtils.default.findTree(tableSourceData, function (item) {
1427
- return rowid === getRowid(_this15, item);
1457
+ return rowid === getRowid(_this16, item);
1428
1458
  }, treeOpts);
1429
1459
 
1430
1460
  row = Object.assign({}, row, _defineProperty({}, children, null));
@@ -1589,7 +1619,7 @@ var Methods = {
1589
1619
  * 如果存在筛选条件,继续处理
1590
1620
  */
1591
1621
  updateAfterFullData: function updateAfterFullData() {
1592
- var _this16 = this;
1622
+ var _this17 = this;
1593
1623
 
1594
1624
  var tableFullColumn = this.tableFullColumn,
1595
1625
  tableFullData = this.tableFullData,
@@ -1667,7 +1697,7 @@ var Methods = {
1667
1697
  cellValue: cellValue,
1668
1698
  row: row,
1669
1699
  column: column,
1670
- $table: _this16
1700
+ $table: _this17
1671
1701
  });
1672
1702
  });
1673
1703
  } else if (compFilterMethod) {
@@ -1678,7 +1708,7 @@ var Methods = {
1678
1708
  cellValue: cellValue,
1679
1709
  row: row,
1680
1710
  column: column,
1681
- $table: _this16
1711
+ $table: _this17
1682
1712
  });
1683
1713
  });
1684
1714
  } else if (allFilterMethod) {
@@ -1697,7 +1727,7 @@ var Methods = {
1697
1727
  cellValue: cellValue,
1698
1728
  row: row,
1699
1729
  column: column,
1700
- $table: _this16
1730
+ $table: _this17
1701
1731
  });
1702
1732
  });
1703
1733
  }
@@ -1750,7 +1780,7 @@ var Methods = {
1750
1780
  tableTree = _xeUtils.default.orderBy(tableTree, orderColumns.map(function (_ref2) {
1751
1781
  var column = _ref2.column,
1752
1782
  order = _ref2.order;
1753
- return [getOrderField(_this16, column), order];
1783
+ return [getOrderField(_this17, column), order];
1754
1784
  }));
1755
1785
  }
1756
1786
 
@@ -1773,7 +1803,7 @@ var Methods = {
1773
1803
  tableData = _xeUtils.default.orderBy(tableData, orderColumns.map(function (_ref3) {
1774
1804
  var column = _ref3.column,
1775
1805
  order = _ref3.order;
1776
- return [getOrderField(_this16, column), order];
1806
+ return [getOrderField(_this17, column), order];
1777
1807
  }));
1778
1808
  } else {
1779
1809
  // 兼容 v2,在 v4 中废弃, sortBy 不能为数组
@@ -1788,7 +1818,7 @@ var Methods = {
1788
1818
  tableData = _xeUtils.default.orderBy(tableData, sortByConfs || [firstOrderColumn].map(function (_ref4) {
1789
1819
  var column = _ref4.column,
1790
1820
  order = _ref4.order;
1791
- return [getOrderField(_this16, column), order];
1821
+ return [getOrderField(_this17, column), order];
1792
1822
  }));
1793
1823
  }
1794
1824
  }
@@ -1807,7 +1837,7 @@ var Methods = {
1807
1837
  * 对渲染中的数据提前解析序号及索引。牺牲提前编译耗时换取渲染中额外损耗,使运行时更加流畅
1808
1838
  */
1809
1839
  updateAfterDataIndex: function updateAfterDataIndex() {
1810
- var _this17 = this;
1840
+ var _this18 = this;
1811
1841
 
1812
1842
  var treeConfig = this.treeConfig,
1813
1843
  afterFullData = this.afterFullData,
@@ -1818,7 +1848,7 @@ var Methods = {
1818
1848
 
1819
1849
  if (treeConfig) {
1820
1850
  _xeUtils.default.eachTree(afterTreeFullData, function (row, index, items, path) {
1821
- var rowid = getRowid(_this17, row);
1851
+ var rowid = getRowid(_this18, row);
1822
1852
  var allrest = fullAllDataRowIdData[rowid];
1823
1853
  var seq = path.map(function (num, i) {
1824
1854
  return i % 2 === 0 ? Number(num) + 1 : '.';
@@ -1847,7 +1877,7 @@ var Methods = {
1847
1877
  });
1848
1878
  } else {
1849
1879
  afterFullData.forEach(function (row, index) {
1850
- var rowid = getRowid(_this17, row);
1880
+ var rowid = getRowid(_this18, row);
1851
1881
  var allrest = fullAllDataRowIdData[rowid];
1852
1882
  var seq = index + 1;
1853
1883
 
@@ -1938,7 +1968,7 @@ var Methods = {
1938
1968
  * 默认执行一次,除非被重置
1939
1969
  */
1940
1970
  handleLoadDefaults: function handleLoadDefaults() {
1941
- var _this18 = this;
1971
+ var _this19 = this;
1942
1972
 
1943
1973
  if (this.checkboxConfig) {
1944
1974
  this.handleDefaultSelectionChecked();
@@ -1965,7 +1995,7 @@ var Methods = {
1965
1995
  }
1966
1996
 
1967
1997
  this.$nextTick(function () {
1968
- return setTimeout(_this18.recalculate);
1998
+ return setTimeout(_this19.recalculate);
1969
1999
  });
1970
2000
  },
1971
2001
 
@@ -2222,12 +2252,12 @@ var Methods = {
2222
2252
  * 刷新列配置
2223
2253
  */
2224
2254
  refreshColumn: function refreshColumn() {
2225
- var _this19 = this;
2255
+ var _this20 = this;
2226
2256
 
2227
2257
  return this.parseColumns().then(function () {
2228
- return _this19.refreshScroll();
2258
+ return _this20.refreshScroll();
2229
2259
  }).then(function () {
2230
- return _this19.recalculate();
2260
+ return _this20.recalculate();
2231
2261
  });
2232
2262
  },
2233
2263
 
@@ -2236,7 +2266,7 @@ var Methods = {
2236
2266
  * 将固定的列左边、右边分别靠边
2237
2267
  */
2238
2268
  parseColumns: function parseColumns() {
2239
- var _this20 = this;
2269
+ var _this21 = this;
2240
2270
 
2241
2271
  var leftList = [];
2242
2272
  var centerList = [];
@@ -2363,11 +2393,11 @@ var Methods = {
2363
2393
  this.visibleColumn = visibleColumn;
2364
2394
  this.handleTableColumn();
2365
2395
  return this.updateFooter().then(function () {
2366
- return _this20.recalculate();
2396
+ return _this21.recalculate();
2367
2397
  }).then(function () {
2368
- _this20.updateCellAreas();
2398
+ _this21.updateCellAreas();
2369
2399
 
2370
- return _this20.recalculate();
2400
+ return _this21.recalculate();
2371
2401
  });
2372
2402
  },
2373
2403
 
@@ -2423,6 +2453,8 @@ var Methods = {
2423
2453
  * 刷新滚动操作,手动同步滚动相关位置(对于某些特殊的操作,比如滚动条错位、固定列不同步)
2424
2454
  */
2425
2455
  refreshScroll: function refreshScroll() {
2456
+ var _this22 = this;
2457
+
2426
2458
  var lastScrollLeft = this.lastScrollLeft,
2427
2459
  lastScrollTop = this.lastScrollTop;
2428
2460
  var $refs = this.$refs;
@@ -2433,17 +2465,24 @@ var Methods = {
2433
2465
  var tableBodyElem = tableBody ? tableBody.$el : null;
2434
2466
  var leftBodyElem = leftBody ? leftBody.$el : null;
2435
2467
  var rightBodyElem = rightBody ? rightBody.$el : null;
2436
- var tableFooterElem = tableFooter ? tableFooter.$el : null; // 还原滚动条位置
2468
+ var tableFooterElem = tableFooter ? tableFooter.$el : null;
2469
+ return new Promise(function (resolve) {
2470
+ // 还原滚动条位置
2471
+ if (lastScrollLeft || lastScrollTop) {
2472
+ return (0, _util.restoreScrollLocation)(_this22, lastScrollLeft, lastScrollTop).then(function () {
2473
+ // 存在滚动行为未结束情况
2474
+ setTimeout(resolve, 30);
2475
+ });
2476
+ } // 重置
2437
2477
 
2438
- if (lastScrollLeft || lastScrollTop) {
2439
- return (0, _util.restoreScrollLocation)(this, lastScrollLeft, lastScrollTop);
2440
- } // 重置
2441
2478
 
2479
+ (0, _dom.setScrollTop)(tableBodyElem, lastScrollTop);
2480
+ (0, _dom.setScrollTop)(leftBodyElem, lastScrollTop);
2481
+ (0, _dom.setScrollTop)(rightBodyElem, lastScrollTop);
2482
+ (0, _dom.setScrollLeft)(tableFooterElem, lastScrollLeft); // 存在滚动行为未结束情况
2442
2483
 
2443
- (0, _dom.setScrollTop)(tableBodyElem, lastScrollTop);
2444
- (0, _dom.setScrollTop)(leftBodyElem, lastScrollTop);
2445
- (0, _dom.setScrollTop)(rightBodyElem, lastScrollTop);
2446
- (0, _dom.setScrollLeft)(tableFooterElem, lastScrollLeft);
2484
+ setTimeout(resolve, 30);
2485
+ });
2447
2486
  },
2448
2487
 
2449
2488
  /**
@@ -2451,7 +2490,7 @@ var Methods = {
2451
2490
  * 支持 width=? width=?px width=?% min-width=? min-width=?px min-width=?%
2452
2491
  */
2453
2492
  recalculate: function recalculate(refull) {
2454
- var _this21 = this;
2493
+ var _this23 = this;
2455
2494
 
2456
2495
  var $refs = this.$refs;
2457
2496
  var tableBody = $refs.tableBody,
@@ -2467,9 +2506,9 @@ var Methods = {
2467
2506
  if (refull === true) {
2468
2507
  // 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
2469
2508
  return this.computeScrollLoad().then(function () {
2470
- _this21.autoCellWidth(headerElem, bodyElem, footerElem);
2509
+ _this23.autoCellWidth(headerElem, bodyElem, footerElem);
2471
2510
 
2472
- return _this21.computeScrollLoad();
2511
+ return _this23.computeScrollLoad();
2473
2512
  });
2474
2513
  }
2475
2514
  }
@@ -2617,7 +2656,7 @@ var Methods = {
2617
2656
  this.customMaxHeight = calcHeight(this, 'maxHeight');
2618
2657
  },
2619
2658
  updateStyle: function updateStyle() {
2620
- var _this22 = this;
2659
+ var _this24 = this;
2621
2660
 
2622
2661
  var $refs = this.$refs,
2623
2662
  isGroup = this.isGroup,
@@ -2721,7 +2760,7 @@ var Methods = {
2721
2760
 
2722
2761
  if (isGroup && listElem) {
2723
2762
  _xeUtils.default.arrayEach(listElem.querySelectorAll('.col--group'), function (thElem) {
2724
- var colNode = _this22.getColumnNode(thElem);
2763
+ var colNode = _this24.getColumnNode(thElem);
2725
2764
 
2726
2765
  if (colNode) {
2727
2766
  var column = colNode.item;
@@ -2751,7 +2790,7 @@ var Methods = {
2751
2790
  } else if (layout === 'body') {
2752
2791
  var emptyBlockElem = elemStore["".concat(name, "-").concat(layout, "-emptyBlock")];
2753
2792
 
2754
- if (wrapperElem) {
2793
+ if (isNodeElement(wrapperElem)) {
2755
2794
  if (customMaxHeight) {
2756
2795
  wrapperElem.style.maxHeight = "".concat(fixedType ? customMaxHeight - headerHeight - (showFooter ? 0 : scrollbarHeight) : customMaxHeight - headerHeight, "px");
2757
2796
  } else {
@@ -2768,7 +2807,7 @@ var Methods = {
2768
2807
  var isRightFixed = fixedType === 'right';
2769
2808
  var _fixedColumn = columnStore["".concat(fixedType, "List")];
2770
2809
 
2771
- if (wrapperElem) {
2810
+ if (isNodeElement(wrapperElem)) {
2772
2811
  wrapperElem.style.top = "".concat(headerHeight, "px");
2773
2812
  }
2774
2813
 
@@ -2838,7 +2877,7 @@ var Methods = {
2838
2877
  return previous + column.renderWidth;
2839
2878
  }, 0);
2840
2879
 
2841
- if (wrapperElem) {
2880
+ if (isNodeElement(wrapperElem)) {
2842
2881
  // 如果是固定列
2843
2882
  if (fixedWrapperElem) {
2844
2883
  wrapperElem.style.top = "".concat(customHeight > 0 ? customHeight - footerHeight : tableHeight + headerHeight, "px");
@@ -2902,10 +2941,10 @@ var Methods = {
2902
2941
 
2903
2942
  if (cellElem) {
2904
2943
  if (colspan > 1) {
2905
- var columnIndex = _this22.getColumnIndex(column);
2944
+ var columnIndex = _this24.getColumnIndex(column);
2906
2945
 
2907
2946
  for (var _index = 1; _index < colspan; _index++) {
2908
- var nextColumn = _this22.getColumns(columnIndex + _index);
2947
+ var nextColumn = _this24.getColumns(columnIndex + _index);
2909
2948
 
2910
2949
  if (nextColumn) {
2911
2950
  colWidth += nextColumn.renderWidth;
@@ -2955,7 +2994,7 @@ var Methods = {
2955
2994
  }
2956
2995
  },
2957
2996
  preventEvent: function preventEvent(evnt, type, args, next, end) {
2958
- var _this23 = this;
2997
+ var _this25 = this;
2959
2998
 
2960
2999
  var evntList = _vXETable.default.interceptor.get(type);
2961
3000
 
@@ -2963,8 +3002,8 @@ var Methods = {
2963
3002
 
2964
3003
  if (!evntList.some(function (func) {
2965
3004
  return func(Object.assign({
2966
- $grid: _this23.$xegrid,
2967
- $table: _this23,
3005
+ $grid: _this25.$xegrid,
3006
+ $table: _this25,
2968
3007
  $event: evnt
2969
3008
  }, args)) === false;
2970
3009
  })) {
@@ -2984,7 +3023,7 @@ var Methods = {
2984
3023
  * 全局按下事件处理
2985
3024
  */
2986
3025
  handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
2987
- var _this24 = this;
3026
+ var _this26 = this;
2988
3027
 
2989
3028
  var $el = this.$el,
2990
3029
  $refs = this.$refs,
@@ -3045,7 +3084,7 @@ var Methods = {
3045
3084
  } // 如果固定了高度且点击了行之外的空白处,则清除激活状态
3046
3085
 
3047
3086
 
3048
- if (!isClearActived && _this24.height && !_this24.overflowY) {
3087
+ if (!isClearActived && _this26.height && !_this26.overflowY) {
3049
3088
  var bodyWrapperElem = evnt.target;
3050
3089
 
3051
3090
  if (hasClass(bodyWrapperElem, 'vxe-table--body-wrapper')) {
@@ -3056,7 +3095,7 @@ var Methods = {
3056
3095
  if (isClearActived || // 如果点击了当前表格之外
3057
3096
  !getEventTargetNode(evnt, $el).flag) {
3058
3097
  setTimeout(function () {
3059
- return _this24.clearActived(evnt);
3098
+ return _this26.clearActived(evnt);
3060
3099
  });
3061
3100
  }
3062
3101
  });
@@ -3070,9 +3109,9 @@ var Methods = {
3070
3109
 
3071
3110
  if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-areas-clear').flag) {
3072
3111
  this.preventEvent(evnt, 'event.clearAreas', {}, function () {
3073
- _this24.clearCellAreas();
3112
+ _this26.clearCellAreas();
3074
3113
 
3075
- _this24.clearCopyCellArea();
3114
+ _this26.clearCopyCellArea();
3076
3115
  });
3077
3116
  }
3078
3117
  }
@@ -3107,7 +3146,7 @@ var Methods = {
3107
3146
  * 表格键盘事件
3108
3147
  */
3109
3148
  keydownEvent: function keydownEvent(evnt) {
3110
- var _this25 = this;
3149
+ var _this27 = this;
3111
3150
 
3112
3151
  var filterStore = this.filterStore,
3113
3152
  ctxMenuStore = this.ctxMenuStore,
@@ -3122,33 +3161,33 @@ var Methods = {
3122
3161
 
3123
3162
  if (isEsc) {
3124
3163
  this.preventEvent(evnt, 'event.keydown', null, function () {
3125
- if (keyboardConfig && mouseConfig && mouseOpts.area && _this25.handleKeyboardEvent) {
3126
- _this25.handleKeyboardEvent(evnt);
3164
+ if (keyboardConfig && mouseConfig && mouseOpts.area && _this27.handleKeyboardEvent) {
3165
+ _this27.handleKeyboardEvent(evnt);
3127
3166
  } else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
3128
3167
  evnt.stopPropagation(); // 如果按下了 Esc 键,关闭快捷菜单、筛选
3129
3168
 
3130
- _this25.closeFilter();
3169
+ _this27.closeFilter();
3131
3170
 
3132
- _this25.closeMenu();
3171
+ _this27.closeMenu();
3133
3172
 
3134
3173
  if (keyboardConfig && keyboardOpts.isEsc) {
3135
3174
  // 如果是激活编辑状态,则取消编辑
3136
3175
  if (actived.row) {
3137
3176
  var params = actived.args;
3138
3177
 
3139
- _this25.clearActived(evnt); // 如果配置了选中功能,则为选中状态
3178
+ _this27.clearActived(evnt); // 如果配置了选中功能,则为选中状态
3140
3179
 
3141
3180
 
3142
3181
  if (mouseConfig && mouseOpts.selected) {
3143
- _this25.$nextTick(function () {
3144
- return _this25.handleSelected(params, evnt);
3182
+ _this27.$nextTick(function () {
3183
+ return _this27.handleSelected(params, evnt);
3145
3184
  });
3146
3185
  }
3147
3186
  }
3148
3187
  }
3149
3188
  }
3150
3189
 
3151
- _this25.emitEvent('keydown', {}, evnt);
3190
+ _this27.emitEvent('keydown', {}, evnt);
3152
3191
  });
3153
3192
  }
3154
3193
  },
@@ -3157,27 +3196,27 @@ var Methods = {
3157
3196
  * 全局键盘事件
3158
3197
  */
3159
3198
  handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
3160
- var _this26 = this;
3199
+ var _this28 = this;
3161
3200
 
3162
3201
  // 该行为只对当前激活的表格有效
3163
3202
  if (this.isActivated) {
3164
3203
  this.preventEvent(evnt, 'event.keydown', null, function () {
3165
- var filterStore = _this26.filterStore,
3166
- isCtxMenu = _this26.isCtxMenu,
3167
- ctxMenuStore = _this26.ctxMenuStore,
3168
- editStore = _this26.editStore,
3169
- editOpts = _this26.editOpts,
3170
- editConfig = _this26.editConfig,
3171
- mouseConfig = _this26.mouseConfig,
3172
- mouseOpts = _this26.mouseOpts,
3173
- keyboardConfig = _this26.keyboardConfig,
3174
- keyboardOpts = _this26.keyboardOpts,
3175
- treeConfig = _this26.treeConfig,
3176
- treeOpts = _this26.treeOpts,
3177
- highlightCurrentRow = _this26.highlightCurrentRow,
3178
- currentRow = _this26.currentRow,
3179
- bodyCtxMenu = _this26.bodyCtxMenu,
3180
- rowOpts = _this26.rowOpts;
3204
+ var filterStore = _this28.filterStore,
3205
+ isCtxMenu = _this28.isCtxMenu,
3206
+ ctxMenuStore = _this28.ctxMenuStore,
3207
+ editStore = _this28.editStore,
3208
+ editOpts = _this28.editOpts,
3209
+ editConfig = _this28.editConfig,
3210
+ mouseConfig = _this28.mouseConfig,
3211
+ mouseOpts = _this28.mouseOpts,
3212
+ keyboardConfig = _this28.keyboardConfig,
3213
+ keyboardOpts = _this28.keyboardOpts,
3214
+ treeConfig = _this28.treeConfig,
3215
+ treeOpts = _this28.treeOpts,
3216
+ highlightCurrentRow = _this28.highlightCurrentRow,
3217
+ currentRow = _this28.currentRow,
3218
+ bodyCtxMenu = _this28.bodyCtxMenu,
3219
+ rowOpts = _this28.rowOpts;
3181
3220
  var selected = editStore.selected,
3182
3221
  actived = editStore.actived;
3183
3222
  var keyCode = evnt.keyCode;
@@ -3204,7 +3243,7 @@ var Methods = {
3204
3243
 
3205
3244
  if (filterStore.visible) {
3206
3245
  if (isEsc) {
3207
- _this26.closeFilter();
3246
+ _this28.closeFilter();
3208
3247
  }
3209
3248
 
3210
3249
  return;
@@ -3215,20 +3254,20 @@ var Methods = {
3215
3254
  evnt.preventDefault();
3216
3255
 
3217
3256
  if (ctxMenuStore.showChild && hasChildrenList(ctxMenuStore.selected)) {
3218
- _this26.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selectChild', 37, false, ctxMenuStore.selected.children);
3257
+ _this28.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selectChild', 37, false, ctxMenuStore.selected.children);
3219
3258
  } else {
3220
- _this26.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selected', 39, true, _this26.ctxMenuList);
3259
+ _this28.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selected', 39, true, _this28.ctxMenuList);
3221
3260
  }
3222
- } else if (keyboardConfig && mouseConfig && mouseOpts.area && _this26.handleKeyboardEvent) {
3223
- _this26.handleKeyboardEvent(evnt);
3261
+ } else if (keyboardConfig && mouseConfig && mouseOpts.area && _this28.handleKeyboardEvent) {
3262
+ _this28.handleKeyboardEvent(evnt);
3224
3263
  } else if (keyboardConfig && isSpacebar && keyboardOpts.isChecked && selected.row && selected.column && (selected.column.type === 'checkbox' || selected.column.type === 'radio')) {
3225
3264
  // 空格键支持选中复选框
3226
3265
  evnt.preventDefault();
3227
3266
 
3228
3267
  if (selected.column.type === 'checkbox') {
3229
- _this26.handleToggleCheckRowEvent(evnt, selected.args);
3268
+ _this28.handleToggleCheckRowEvent(evnt, selected.args);
3230
3269
  } else {
3231
- _this26.triggerRadioRowEvent(evnt, selected.args);
3270
+ _this28.triggerRadioRowEvent(evnt, selected.args);
3232
3271
  }
3233
3272
  } else if (isF2 && (0, _utils.isEnableConf)(editConfig)) {
3234
3273
  if (!isEditStatus) {
@@ -3237,15 +3276,15 @@ var Methods = {
3237
3276
  evnt.stopPropagation();
3238
3277
  evnt.preventDefault();
3239
3278
 
3240
- _this26.handleActived(selected.args, evnt);
3279
+ _this28.handleActived(selected.args, evnt);
3241
3280
  }
3242
3281
  }
3243
3282
  } else if (isContextMenu) {
3244
3283
  // 如果按下上下文键
3245
- _this26._keyCtx = selected.row && selected.column && bodyCtxMenu.length;
3246
- clearTimeout(_this26.keyCtxTimeout);
3247
- _this26.keyCtxTimeout = setTimeout(function () {
3248
- _this26._keyCtx = false;
3284
+ _this28._keyCtx = selected.row && selected.column && bodyCtxMenu.length;
3285
+ clearTimeout(_this28.keyCtxTimeout);
3286
+ _this28.keyCtxTimeout = setTimeout(function () {
3287
+ _this28._keyCtx = false;
3249
3288
  }, 1000);
3250
3289
  } else if (isEnter && !hasAltKey && keyboardConfig && keyboardOpts.isEnter && (selected.row || actived.row || treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow)) {
3251
3290
  // 退出选中
@@ -3254,12 +3293,12 @@ var Methods = {
3254
3293
  if (actived.row) {
3255
3294
  params = actived.args;
3256
3295
 
3257
- _this26.clearActived(evnt); // 如果配置了选中功能,则为选中状态
3296
+ _this28.clearActived(evnt); // 如果配置了选中功能,则为选中状态
3258
3297
 
3259
3298
 
3260
3299
  if (mouseConfig && mouseOpts.selected) {
3261
- _this26.$nextTick(function () {
3262
- return _this26.handleSelected(params, evnt);
3300
+ _this28.$nextTick(function () {
3301
+ return _this28.handleSelected(params, evnt);
3263
3302
  });
3264
3303
  }
3265
3304
  }
@@ -3270,15 +3309,15 @@ var Methods = {
3270
3309
 
3271
3310
  if (hasShiftKey) {
3272
3311
  if (keyboardOpts.enterToTab) {
3273
- _this26.moveTabSelected(targetArgs, hasShiftKey, evnt);
3312
+ _this28.moveTabSelected(targetArgs, hasShiftKey, evnt);
3274
3313
  } else {
3275
- _this26.moveSelected(targetArgs, isLeftArrow, true, isRightArrow, false, evnt);
3314
+ _this28.moveSelected(targetArgs, isLeftArrow, true, isRightArrow, false, evnt);
3276
3315
  }
3277
3316
  } else {
3278
3317
  if (keyboardOpts.enterToTab) {
3279
- _this26.moveTabSelected(targetArgs, hasShiftKey, evnt);
3318
+ _this28.moveTabSelected(targetArgs, hasShiftKey, evnt);
3280
3319
  } else {
3281
- _this26.moveSelected(targetArgs, isLeftArrow, false, isRightArrow, true, evnt);
3320
+ _this28.moveSelected(targetArgs, isLeftArrow, false, isRightArrow, true, evnt);
3282
3321
  }
3283
3322
  }
3284
3323
  } else if (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
@@ -3289,14 +3328,14 @@ var Methods = {
3289
3328
  evnt.preventDefault();
3290
3329
  var targetRow = childrens[0];
3291
3330
  params = {
3292
- $table: _this26,
3331
+ $table: _this28,
3293
3332
  row: targetRow
3294
3333
  };
3295
3334
 
3296
- _this26.setTreeExpand(currentRow, true).then(function () {
3297
- return _this26.scrollToRow(targetRow);
3335
+ _this28.setTreeExpand(currentRow, true).then(function () {
3336
+ return _this28.scrollToRow(targetRow);
3298
3337
  }).then(function () {
3299
- return _this26.triggerCurrentRowEvent(evnt, params);
3338
+ return _this28.triggerCurrentRowEvent(evnt, params);
3300
3339
  });
3301
3340
  }
3302
3341
  }
@@ -3305,18 +3344,18 @@ var Methods = {
3305
3344
  if (!isEditStatus) {
3306
3345
  // 如果按下了方向键
3307
3346
  if (selected.row && selected.column) {
3308
- _this26.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
3347
+ _this28.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
3309
3348
  } else if ((isUpArrow || isDwArrow) && (rowOpts.isCurrent || highlightCurrentRow)) {
3310
3349
  // 当前行按键上下移动
3311
- _this26.moveCurrentRow(isUpArrow, isDwArrow, evnt);
3350
+ _this28.moveCurrentRow(isUpArrow, isDwArrow, evnt);
3312
3351
  }
3313
3352
  }
3314
3353
  } else if (isTab && keyboardConfig && keyboardOpts.isTab) {
3315
3354
  // 如果按下了 Tab 键切换
3316
3355
  if (selected.row || selected.column) {
3317
- _this26.moveTabSelected(selected.args, hasShiftKey, evnt);
3356
+ _this28.moveTabSelected(selected.args, hasShiftKey, evnt);
3318
3357
  } else if (actived.row || actived.column) {
3319
- _this26.moveTabSelected(actived.args, hasShiftKey, evnt);
3358
+ _this28.moveTabSelected(actived.args, hasShiftKey, evnt);
3320
3359
  }
3321
3360
  } else if (keyboardConfig && (isDel || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow ? isBack && keyboardOpts.isArrow : isBack))) {
3322
3361
  if (!isEditStatus) {
@@ -3327,10 +3366,10 @@ var Methods = {
3327
3366
  if (delMethod) {
3328
3367
  delMethod({
3329
3368
  row: selected.row,
3330
- rowIndex: _this26.getRowIndex(selected.row),
3369
+ rowIndex: _this28.getRowIndex(selected.row),
3331
3370
  column: selected.column,
3332
- columnIndex: _this26.getColumnIndex(selected.column),
3333
- $table: _this26
3371
+ columnIndex: _this28.getColumnIndex(selected.column),
3372
+ $table: _this28
3334
3373
  });
3335
3374
  } else {
3336
3375
  setCellValue(selected.row, selected.column, null);
@@ -3340,21 +3379,21 @@ var Methods = {
3340
3379
  if (backMethod) {
3341
3380
  backMethod({
3342
3381
  row: selected.row,
3343
- rowIndex: _this26.getRowIndex(selected.row),
3382
+ rowIndex: _this28.getRowIndex(selected.row),
3344
3383
  column: selected.column,
3345
- columnIndex: _this26.getColumnIndex(selected.column),
3346
- $table: _this26
3384
+ columnIndex: _this28.getColumnIndex(selected.column),
3385
+ $table: _this28
3347
3386
  });
3348
3387
  } else {
3349
- _this26.handleActived(selected.args, evnt);
3388
+ _this28.handleActived(selected.args, evnt);
3350
3389
  }
3351
3390
  } else if (isDel) {
3352
3391
  // 如果按下 del 键,更新表尾数据
3353
- _this26.updateFooter();
3392
+ _this28.updateFooter();
3354
3393
  }
3355
3394
  } else if (isBack && keyboardOpts.isArrow && treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
3356
3395
  // 如果树形表格回退键关闭当前行返回父节点
3357
- var _XEUtils$findTree = _xeUtils.default.findTree(_this26.afterFullData, function (item) {
3396
+ var _XEUtils$findTree = _xeUtils.default.findTree(_this28.afterFullData, function (item) {
3358
3397
  return item === currentRow;
3359
3398
  }, treeOpts),
3360
3399
  parentRow = _XEUtils$findTree.parent;
@@ -3362,14 +3401,14 @@ var Methods = {
3362
3401
  if (parentRow) {
3363
3402
  evnt.preventDefault();
3364
3403
  params = {
3365
- $table: _this26,
3404
+ $table: _this28,
3366
3405
  row: parentRow
3367
3406
  };
3368
3407
 
3369
- _this26.setTreeExpand(parentRow, false).then(function () {
3370
- return _this26.scrollToRow(parentRow);
3408
+ _this28.setTreeExpand(parentRow, false).then(function () {
3409
+ return _this28.scrollToRow(parentRow);
3371
3410
  }).then(function () {
3372
- return _this26.triggerCurrentRowEvent(evnt, params);
3411
+ return _this28.triggerCurrentRowEvent(evnt, params);
3373
3412
  });
3374
3413
  }
3375
3414
  }
@@ -3383,26 +3422,26 @@ var Methods = {
3383
3422
 
3384
3423
  if (selected.column && selected.row && (0, _utils.isEnableConf)(selected.column.editRender)) {
3385
3424
  if (!editOpts.activeMethod || editOpts.activeMethod(_objectSpread(_objectSpread({}, selected.args), {}, {
3386
- $table: _this26
3425
+ $table: _this28
3387
3426
  }))) {
3388
3427
  if (editMethod) {
3389
3428
  editMethod({
3390
3429
  row: selected.row,
3391
- rowIndex: _this26.getRowIndex(selected.row),
3430
+ rowIndex: _this28.getRowIndex(selected.row),
3392
3431
  column: selected.column,
3393
- columnIndex: _this26.getColumnIndex(selected.column),
3394
- $table: _this26
3432
+ columnIndex: _this28.getColumnIndex(selected.column),
3433
+ $table: _this28
3395
3434
  });
3396
3435
  } else {
3397
3436
  setCellValue(selected.row, selected.column, null);
3398
3437
 
3399
- _this26.handleActived(selected.args, evnt);
3438
+ _this28.handleActived(selected.args, evnt);
3400
3439
  }
3401
3440
  }
3402
3441
  }
3403
3442
  }
3404
3443
 
3405
- _this26.emitEvent('keydown', {}, evnt);
3444
+ _this28.emitEvent('keydown', {}, evnt);
3406
3445
  });
3407
3446
  }
3408
3447
  },
@@ -3472,33 +3511,46 @@ var Methods = {
3472
3511
  this.recalculate(true);
3473
3512
  },
3474
3513
  handleTooltipLeaveMethod: function handleTooltipLeaveMethod() {
3475
- var _this27 = this;
3514
+ var _this29 = this;
3476
3515
 
3477
3516
  var tooltipOpts = this.tooltipOpts;
3478
3517
  setTimeout(function () {
3479
- if (!_this27.tooltipActive) {
3480
- _this27.closeTooltip();
3518
+ if (!_this29.tooltipActive) {
3519
+ _this29.closeTooltip();
3481
3520
  }
3482
3521
  }, tooltipOpts.leaveDelay);
3483
3522
  return false;
3484
3523
  },
3485
- handleTargetEnterEvent: function handleTargetEnterEvent() {
3524
+ handleTargetEnterEvent: function handleTargetEnterEvent(isClear) {
3525
+ var $tooltip = this.$refs.tooltip;
3486
3526
  clearTimeout(this.tooltipTimeout);
3487
3527
  this.tooltipActive = true;
3488
- this.closeTooltip();
3528
+
3529
+ if (isClear) {
3530
+ this.closeTooltip();
3531
+ } else {
3532
+ if ($tooltip) {
3533
+ $tooltip.setActived(true);
3534
+ }
3535
+ }
3489
3536
  },
3490
3537
  handleTargetLeaveEvent: function handleTargetLeaveEvent() {
3491
- var _this28 = this;
3538
+ var _this30 = this;
3492
3539
 
3493
3540
  var tooltipOpts = this.tooltipOpts;
3541
+ var $tooltip = this.$refs.tooltip;
3494
3542
  this.tooltipActive = false;
3495
3543
 
3544
+ if ($tooltip) {
3545
+ $tooltip.setActived(false);
3546
+ }
3547
+
3496
3548
  if (tooltipOpts.enterable) {
3497
3549
  this.tooltipTimeout = setTimeout(function () {
3498
- var tooltip = _this28.$refs.tooltip;
3550
+ $tooltip = _this30.$refs.tooltip;
3499
3551
 
3500
- if (tooltip && !tooltip.isHover) {
3501
- _this28.closeTooltip();
3552
+ if ($tooltip && !$tooltip.isActived()) {
3553
+ _this30.closeTooltip();
3502
3554
  }
3503
3555
  }, tooltipOpts.leaveDelay);
3504
3556
  } else {
@@ -3512,15 +3564,15 @@ var Methods = {
3512
3564
  if (titleHelp.content || titleHelp.message) {
3513
3565
  var $refs = this.$refs,
3514
3566
  tooltipStore = this.tooltipStore;
3515
- var tooltip = $refs.tooltip;
3567
+ var $tooltip = $refs.tooltip;
3516
3568
 
3517
3569
  var content = _tools.UtilTools.getFuncText(titleHelp.content || titleHelp.message);
3518
3570
 
3519
- this.handleTargetEnterEvent();
3571
+ this.handleTargetEnterEvent(true);
3520
3572
  tooltipStore.visible = true;
3521
3573
 
3522
- if (tooltip) {
3523
- tooltip.open(evnt.currentTarget, content);
3574
+ if ($tooltip) {
3575
+ $tooltip.open(evnt.currentTarget, content);
3524
3576
  }
3525
3577
  }
3526
3578
  },
@@ -3532,7 +3584,7 @@ var Methods = {
3532
3584
  var tooltipStore = this.tooltipStore;
3533
3585
  var column = params.column;
3534
3586
  var titleElem = evnt.currentTarget;
3535
- this.handleTargetEnterEvent();
3587
+ this.handleTargetEnterEvent(tooltipStore.column !== column || tooltipStore.row);
3536
3588
 
3537
3589
  if (tooltipStore.column !== column || !tooltipStore.visible) {
3538
3590
  this.handleTooltip(evnt, titleElem, titleElem, null, params);
@@ -3551,7 +3603,7 @@ var Methods = {
3551
3603
  var row = params.row,
3552
3604
  column = params.column;
3553
3605
  var cell = evnt.currentTarget;
3554
- this.handleTargetEnterEvent();
3606
+ this.handleTargetEnterEvent(tooltipStore.column !== column || tooltipStore.row !== row);
3555
3607
 
3556
3608
  if ((0, _utils.isEnableConf)(editConfig)) {
3557
3609
  if (editOpts.mode === 'row' && actived.row === row || actived.row === row && actived.column === column) {
@@ -3584,7 +3636,7 @@ var Methods = {
3584
3636
  var column = params.column;
3585
3637
  var tooltipStore = this.tooltipStore;
3586
3638
  var cell = evnt.currentTarget;
3587
- this.handleTargetEnterEvent();
3639
+ this.handleTargetEnterEvent(true);
3588
3640
 
3589
3641
  if (tooltipStore.column !== column || !tooltipStore.visible) {
3590
3642
  this.handleTooltip(evnt, cell, cell.querySelector('.vxe-cell--item') || cell.children[0], null, params);
@@ -3731,14 +3783,14 @@ var Methods = {
3731
3783
  * @param {Boolean} value 是否选中
3732
3784
  */
3733
3785
  setCheckboxRow: function setCheckboxRow(rows, value) {
3734
- var _this29 = this;
3786
+ var _this31 = this;
3735
3787
 
3736
3788
  if (rows && !_xeUtils.default.isArray(rows)) {
3737
3789
  rows = [rows];
3738
3790
  }
3739
3791
 
3740
3792
  rows.forEach(function (row) {
3741
- return _this29.handleSelectRow({
3793
+ return _this31.handleSelectRow({
3742
3794
  row: row
3743
3795
  }, !!value);
3744
3796
  });
@@ -3762,7 +3814,7 @@ var Methods = {
3762
3814
  * value 选中true 不选false 半选-1
3763
3815
  */
3764
3816
  handleSelectRow: function handleSelectRow(_ref6, value) {
3765
- var _this30 = this;
3817
+ var _this32 = this;
3766
3818
 
3767
3819
  var row = _ref6.row;
3768
3820
  var selection = this.selection,
@@ -3795,7 +3847,7 @@ var Methods = {
3795
3847
  return half === item;
3796
3848
  });
3797
3849
 
3798
- _this30.handleCheckboxReserveRow(row, value);
3850
+ _this32.handleCheckboxReserveRow(row, value);
3799
3851
  }
3800
3852
  }, treeOpts);
3801
3853
  } // 如果存在父节点,更新父节点状态
@@ -3869,7 +3921,7 @@ var Methods = {
3869
3921
  return half === item;
3870
3922
  });
3871
3923
 
3872
- _this30.handleCheckboxReserveRow(row, value);
3924
+ _this32.handleCheckboxReserveRow(row, value);
3873
3925
  }
3874
3926
  }, treeOpts);
3875
3927
  } // 如果存在父节点,更新父节点状态
@@ -3973,7 +4025,7 @@ var Methods = {
3973
4025
  * @param {Boolean} value 是否选中
3974
4026
  */
3975
4027
  setAllCheckboxRow: function setAllCheckboxRow(value) {
3976
- var _this31 = this;
4028
+ var _this33 = this;
3977
4029
 
3978
4030
  var afterFullData = this.afterFullData,
3979
4031
  treeConfig = this.treeConfig,
@@ -4086,11 +4138,11 @@ var Methods = {
4086
4138
  if (reserve) {
4087
4139
  if (value) {
4088
4140
  selectRows.forEach(function (row) {
4089
- checkboxReserveRowMap[getRowid(_this31, row)] = row;
4141
+ checkboxReserveRowMap[getRowid(_this33, row)] = row;
4090
4142
  });
4091
4143
  } else {
4092
4144
  afterFullData.forEach(function (row) {
4093
- return _this31.handleCheckboxReserveRow(row, false);
4145
+ return _this33.handleCheckboxReserveRow(row, false);
4094
4146
  });
4095
4147
  }
4096
4148
  }
@@ -4310,7 +4362,7 @@ var Methods = {
4310
4362
  * 获取复选框保留选中的行
4311
4363
  */
4312
4364
  getCheckboxReserveRecords: function getCheckboxReserveRecords(isFull) {
4313
- var _this32 = this;
4365
+ var _this34 = this;
4314
4366
 
4315
4367
  var fullDataRowIdData = this.fullDataRowIdData,
4316
4368
  afterFullData = this.afterFullData,
@@ -4325,11 +4377,11 @@ var Methods = {
4325
4377
 
4326
4378
  if (treeConfig) {
4327
4379
  _xeUtils.default.eachTree(afterFullData, function (row) {
4328
- afterFullIdMaps[getRowid(_this32, row)] = 1;
4380
+ afterFullIdMaps[getRowid(_this34, row)] = 1;
4329
4381
  }, treeOpts);
4330
4382
  } else {
4331
4383
  afterFullData.forEach(function (row) {
4332
- afterFullIdMaps[getRowid(_this32, row)] = 1;
4384
+ afterFullIdMaps[getRowid(_this34, row)] = 1;
4333
4385
  });
4334
4386
  }
4335
4387
 
@@ -4395,7 +4447,7 @@ var Methods = {
4395
4447
  * 清空行为不管是否被禁用还是保留记录,都将彻底清空选中状态
4396
4448
  */
4397
4449
  clearCheckboxRow: function clearCheckboxRow() {
4398
- var _this33 = this;
4450
+ var _this35 = this;
4399
4451
 
4400
4452
  var tableFullData = this.tableFullData,
4401
4453
  treeConfig = this.treeConfig,
@@ -4418,7 +4470,7 @@ var Methods = {
4418
4470
 
4419
4471
  if (reserve) {
4420
4472
  tableFullData.forEach(function (row) {
4421
- return _this33.handleCheckboxReserveRow(row, false);
4473
+ return _this35.handleCheckboxReserveRow(row, false);
4422
4474
  });
4423
4475
  }
4424
4476
 
@@ -4710,13 +4762,13 @@ var Methods = {
4710
4762
  * 如果存在规则,则校验
4711
4763
  */
4712
4764
  handleChangeCell: function handleChangeCell(evnt, params) {
4713
- var _this34 = this;
4765
+ var _this36 = this;
4714
4766
 
4715
4767
  this.checkValidate('blur').catch(function (e) {
4716
4768
  return e;
4717
4769
  }).then(function () {
4718
- _this34.handleActived(params, evnt).then(function () {
4719
- return _this34.checkValidate('change');
4770
+ _this36.handleActived(params, evnt).then(function () {
4771
+ return _this36.checkValidate('change');
4720
4772
  }).catch(function (e) {
4721
4773
  return e;
4722
4774
  });
@@ -4819,7 +4871,7 @@ var Methods = {
4819
4871
  * 如果是双击模式,则激活为编辑状态
4820
4872
  */
4821
4873
  triggerCellDblclickEvent: function triggerCellDblclickEvent(evnt, params) {
4822
- var _this35 = this;
4874
+ var _this37 = this;
4823
4875
 
4824
4876
  var editStore = this.editStore,
4825
4877
  editConfig = this.editConfig,
@@ -4834,15 +4886,15 @@ var Methods = {
4834
4886
  this.checkValidate('blur').catch(function (e) {
4835
4887
  return e;
4836
4888
  }).then(function () {
4837
- _this35.handleActived(params, evnt).then(function () {
4838
- return _this35.checkValidate('change');
4889
+ _this37.handleActived(params, evnt).then(function () {
4890
+ return _this37.checkValidate('change');
4839
4891
  }).catch(function (e) {
4840
4892
  return e;
4841
4893
  });
4842
4894
  });
4843
4895
  } else if (editOpts.mode === 'cell') {
4844
4896
  this.handleActived(params, evnt).then(function () {
4845
- return _this35.checkValidate('change');
4897
+ return _this37.checkValidate('change');
4846
4898
  }).catch(function (e) {
4847
4899
  return e;
4848
4900
  });
@@ -4853,7 +4905,7 @@ var Methods = {
4853
4905
  this.emitEvent('cell-dblclick', params, evnt);
4854
4906
  },
4855
4907
  handleDefaultSort: function handleDefaultSort() {
4856
- var _this36 = this;
4908
+ var _this38 = this;
4857
4909
 
4858
4910
  var sortConfig = this.sortConfig,
4859
4911
  sortOpts = this.sortOpts;
@@ -4870,7 +4922,7 @@ var Methods = {
4870
4922
  order = item.order;
4871
4923
 
4872
4924
  if (field && order) {
4873
- var column = _this36.getColumnByField(field);
4925
+ var column = _this38.getColumnByField(field);
4874
4926
 
4875
4927
  if (column && column.sortable) {
4876
4928
  column.order = order;
@@ -4913,7 +4965,7 @@ var Methods = {
4913
4965
  }
4914
4966
  },
4915
4967
  sort: function sort(sortConfs, sortOrder) {
4916
- var _this37 = this;
4968
+ var _this39 = this;
4917
4969
 
4918
4970
  var sortOpts = this.sortOpts;
4919
4971
  var multiple = sortOpts.multiple,
@@ -4946,7 +4998,7 @@ var Methods = {
4946
4998
  var column = field;
4947
4999
 
4948
5000
  if (_xeUtils.default.isString(field)) {
4949
- column = _this37.getColumnByField(field);
5001
+ column = _this39.getColumnByField(field);
4950
5002
  }
4951
5003
 
4952
5004
  if (column && (column.sortable || column.remoteSort)) {
@@ -4955,7 +5007,7 @@ var Methods = {
4955
5007
  }
4956
5008
 
4957
5009
  if (orders.indexOf(order) === -1) {
4958
- order = getNextSortOrder(_this37, column);
5010
+ order = getNextSortOrder(_this39, column);
4959
5011
  }
4960
5012
 
4961
5013
  if (column.order !== order) {
@@ -5108,7 +5160,7 @@ var Methods = {
5108
5160
  * @param {Row} row 行对象
5109
5161
  */
5110
5162
  reloadRowExpand: function reloadRowExpand(row) {
5111
- var _this38 = this;
5163
+ var _this40 = this;
5112
5164
 
5113
5165
  var expandOpts = this.expandOpts,
5114
5166
  expandLazyLoadeds = this.expandLazyLoadeds;
@@ -5116,7 +5168,7 @@ var Methods = {
5116
5168
 
5117
5169
  if (lazy && expandLazyLoadeds.indexOf(row) === -1) {
5118
5170
  this.clearRowExpandLoaded(row).then(function () {
5119
- return _this38.handleAsyncRowExpand(row);
5171
+ return _this40.handleAsyncRowExpand(row);
5120
5172
  });
5121
5173
  }
5122
5174
 
@@ -5195,29 +5247,29 @@ var Methods = {
5195
5247
  return this.setRowExpand(this.expandOpts.lazy ? this.tableData : this.tableFullData, expanded);
5196
5248
  },
5197
5249
  handleAsyncRowExpand: function handleAsyncRowExpand(row) {
5198
- var _this39 = this;
5250
+ var _this41 = this;
5199
5251
 
5200
5252
  var rest = this.fullAllDataRowMap.get(row);
5201
5253
  return new Promise(function (resolve) {
5202
- _this39.expandLazyLoadeds.push(row);
5254
+ _this41.expandLazyLoadeds.push(row);
5203
5255
 
5204
- _this39.expandOpts.loadMethod({
5205
- $table: _this39,
5256
+ _this41.expandOpts.loadMethod({
5257
+ $table: _this41,
5206
5258
  row: row,
5207
- rowIndex: _this39.getRowIndex(row),
5208
- $rowIndex: _this39.getVMRowIndex(row)
5259
+ rowIndex: _this41.getRowIndex(row),
5260
+ $rowIndex: _this41.getVMRowIndex(row)
5209
5261
  }).catch(function (e) {
5210
5262
  return e;
5211
5263
  }).then(function () {
5212
5264
  rest.expandLoaded = true;
5213
5265
 
5214
- _xeUtils.default.remove(_this39.expandLazyLoadeds, function (item) {
5266
+ _xeUtils.default.remove(_this41.expandLazyLoadeds, function (item) {
5215
5267
  return item === row;
5216
5268
  });
5217
5269
 
5218
- _this39.rowExpandeds.push(row);
5270
+ _this41.rowExpandeds.push(row);
5219
5271
 
5220
- resolve(_this39.$nextTick().then(_this39.recalculate));
5272
+ resolve(_this41.$nextTick().then(_this41.recalculate));
5221
5273
  });
5222
5274
  });
5223
5275
  },
@@ -5230,7 +5282,7 @@ var Methods = {
5230
5282
  * @param {Boolean} expanded 是否展开
5231
5283
  */
5232
5284
  setRowExpand: function setRowExpand(rows, expanded) {
5233
- var _this40 = this;
5285
+ var _this42 = this;
5234
5286
 
5235
5287
  var fullAllDataRowMap = this.fullAllDataRowMap,
5236
5288
  expandLazyLoadeds = this.expandLazyLoadeds,
@@ -5263,8 +5315,8 @@ var Methods = {
5263
5315
  columnIndex: columnIndex,
5264
5316
  $columnIndex: $columnIndex,
5265
5317
  row: row,
5266
- rowIndex: _this40.getRowIndex(row),
5267
- $rowIndex: _this40.getVMRowIndex(row)
5318
+ rowIndex: _this42.getRowIndex(row),
5319
+ $rowIndex: _this42.getVMRowIndex(row)
5268
5320
  });
5269
5321
  }) : rows;
5270
5322
 
@@ -5275,7 +5327,7 @@ var Methods = {
5275
5327
  var isLoad = lazy && !rest.expandLoaded && expandLazyLoadeds.indexOf(row) === -1;
5276
5328
 
5277
5329
  if (isLoad) {
5278
- lazyRests.push(_this40.handleAsyncRowExpand(row));
5330
+ lazyRests.push(_this42.handleAsyncRowExpand(row));
5279
5331
  } else {
5280
5332
  rowExpandeds.push(row);
5281
5333
  }
@@ -5289,7 +5341,7 @@ var Methods = {
5289
5341
 
5290
5342
  if (reserve) {
5291
5343
  validRows.forEach(function (row) {
5292
- return _this40.handleRowExpandReserve(row, expanded);
5344
+ return _this42.handleRowExpandReserve(row, expanded);
5293
5345
  });
5294
5346
  }
5295
5347
  }
@@ -5310,7 +5362,7 @@ var Methods = {
5310
5362
  * 手动清空展开行状态,数据会恢复成未展开的状态
5311
5363
  */
5312
5364
  clearRowExpand: function clearRowExpand() {
5313
- var _this41 = this;
5365
+ var _this43 = this;
5314
5366
 
5315
5367
  var expandOpts = this.expandOpts,
5316
5368
  rowExpandeds = this.rowExpandeds,
@@ -5321,13 +5373,13 @@ var Methods = {
5321
5373
 
5322
5374
  if (reserve) {
5323
5375
  tableFullData.forEach(function (row) {
5324
- return _this41.handleRowExpandReserve(row, false);
5376
+ return _this43.handleRowExpandReserve(row, false);
5325
5377
  });
5326
5378
  }
5327
5379
 
5328
5380
  return this.$nextTick().then(function () {
5329
5381
  if (isExists) {
5330
- _this41.recalculate();
5382
+ _this43.recalculate();
5331
5383
  }
5332
5384
  });
5333
5385
  },
@@ -5407,7 +5459,7 @@ var Methods = {
5407
5459
  * @param {Row} row 行对象
5408
5460
  */
5409
5461
  reloadTreeExpand: function reloadTreeExpand(row) {
5410
- var _this42 = this;
5462
+ var _this44 = this;
5411
5463
 
5412
5464
  var treeOpts = this.treeOpts,
5413
5465
  treeLazyLoadeds = this.treeLazyLoadeds;
@@ -5417,15 +5469,15 @@ var Methods = {
5417
5469
 
5418
5470
  if (lazy && row[hasChild] && treeLazyLoadeds.indexOf(row) === -1) {
5419
5471
  this.clearTreeExpandLoaded(row).then(function () {
5420
- return _this42.handleAsyncTreeExpandChilds(row);
5472
+ return _this44.handleAsyncTreeExpandChilds(row);
5421
5473
  }).then(function () {
5422
5474
  if (transform) {
5423
- _this42.handleVirtualTreeToList();
5475
+ _this44.handleVirtualTreeToList();
5424
5476
 
5425
- return _this42.handleTableData();
5477
+ return _this44.handleTableData();
5426
5478
  }
5427
5479
  }).then(function () {
5428
- return _this42.recalculate();
5480
+ return _this44.recalculate();
5429
5481
  });
5430
5482
  }
5431
5483
 
@@ -5503,7 +5555,7 @@ var Methods = {
5503
5555
  }
5504
5556
  },
5505
5557
  handleAsyncTreeExpandChilds: function handleAsyncTreeExpandChilds(row) {
5506
- var _this43 = this;
5558
+ var _this45 = this;
5507
5559
 
5508
5560
  var fullAllDataRowMap = this.fullAllDataRowMap,
5509
5561
  treeExpandeds = this.treeExpandeds,
@@ -5517,7 +5569,7 @@ var Methods = {
5517
5569
  return new Promise(function (resolve) {
5518
5570
  treeLazyLoadeds.push(row);
5519
5571
  loadMethod({
5520
- $table: _this43,
5572
+ $table: _this45,
5521
5573
  row: row
5522
5574
  }).catch(function () {
5523
5575
  return [];
@@ -5533,29 +5585,29 @@ var Methods = {
5533
5585
  }
5534
5586
 
5535
5587
  if (childRecords) {
5536
- _this43.loadTreeChildren(row, childRecords).then(function (childRows) {
5588
+ _this45.loadTreeChildren(row, childRecords).then(function (childRows) {
5537
5589
  if (childRows.length && treeExpandeds.indexOf(row) === -1) {
5538
5590
  treeExpandeds.push(row);
5539
5591
  } // 如果当前节点已选中,则展开后子节点也被选中
5540
5592
 
5541
5593
 
5542
- if (!checkStrictly && _this43.isCheckedByCheckboxRow(row)) {
5543
- _this43.setCheckboxRow(childRows, true);
5594
+ if (!checkStrictly && _this45.isCheckedByCheckboxRow(row)) {
5595
+ _this45.setCheckboxRow(childRows, true);
5544
5596
  }
5545
5597
 
5546
- _this43.$nextTick().then(function () {
5598
+ _this45.$nextTick().then(function () {
5547
5599
  if (transform) {
5548
- return _this43.handleTableData();
5600
+ return _this45.handleTableData();
5549
5601
  }
5550
5602
  }).then(function () {
5551
- return _this43.recalculate();
5603
+ return _this45.recalculate();
5552
5604
  }).then(function () {
5553
5605
  return resolve();
5554
5606
  });
5555
5607
  });
5556
5608
  } else {
5557
- _this43.$nextTick().then(function () {
5558
- return _this43.recalculate();
5609
+ _this45.$nextTick().then(function () {
5610
+ return _this45.recalculate();
5559
5611
  }).then(function () {
5560
5612
  return resolve();
5561
5613
  });
@@ -5593,7 +5645,7 @@ var Methods = {
5593
5645
  * @returns
5594
5646
  */
5595
5647
  handleBaseTreeExpand: function handleBaseTreeExpand(rows, expanded) {
5596
- var _this44 = this;
5648
+ var _this46 = this;
5597
5649
 
5598
5650
  var fullAllDataRowMap = this.fullAllDataRowMap,
5599
5651
  tableFullData = this.tableFullData,
@@ -5641,7 +5693,7 @@ var Methods = {
5641
5693
  var isLoad = lazy && row[hasChild] && !rest.treeLoaded && treeLazyLoadeds.indexOf(row) === -1; // 是否使用懒加载
5642
5694
 
5643
5695
  if (isLoad) {
5644
- result.push(_this44.handleAsyncTreeExpandChilds(row));
5696
+ result.push(_this46.handleAsyncTreeExpandChilds(row));
5645
5697
  } else {
5646
5698
  if (row[children] && row[children].length) {
5647
5699
  treeExpandeds.push(row);
@@ -5657,7 +5709,7 @@ var Methods = {
5657
5709
 
5658
5710
  if (reserve) {
5659
5711
  validRows.forEach(function (row) {
5660
- return _this44.handleTreeExpandReserve(row, expanded);
5712
+ return _this46.handleTreeExpandReserve(row, expanded);
5661
5713
  });
5662
5714
  }
5663
5715
 
@@ -5671,14 +5723,14 @@ var Methods = {
5671
5723
  * @returns
5672
5724
  */
5673
5725
  handleVirtualTreeExpand: function handleVirtualTreeExpand(rows, expanded) {
5674
- var _this45 = this;
5726
+ var _this47 = this;
5675
5727
 
5676
5728
  return this.handleBaseTreeExpand(rows, expanded).then(function () {
5677
- _this45.handleVirtualTreeToList();
5729
+ _this47.handleVirtualTreeToList();
5678
5730
 
5679
- return _this45.handleTableData();
5731
+ return _this47.handleTableData();
5680
5732
  }).then(function () {
5681
- return _this45.recalculate();
5733
+ return _this47.recalculate();
5682
5734
  });
5683
5735
  },
5684
5736
 
@@ -5723,7 +5775,7 @@ var Methods = {
5723
5775
  * 手动清空树形节点的展开状态,数据会恢复成未展开的状态
5724
5776
  */
5725
5777
  clearTreeExpand: function clearTreeExpand() {
5726
- var _this46 = this;
5778
+ var _this48 = this;
5727
5779
 
5728
5780
  var treeOpts = this.treeOpts,
5729
5781
  treeExpandeds = this.treeExpandeds,
@@ -5735,19 +5787,19 @@ var Methods = {
5735
5787
 
5736
5788
  if (reserve) {
5737
5789
  _xeUtils.default.eachTree(tableFullData, function (row) {
5738
- return _this46.handleTreeExpandReserve(row, false);
5790
+ return _this48.handleTreeExpandReserve(row, false);
5739
5791
  }, treeOpts);
5740
5792
  }
5741
5793
 
5742
5794
  return this.handleTableData().then(function () {
5743
5795
  if (transform) {
5744
- _this46.handleVirtualTreeToList();
5796
+ _this48.handleVirtualTreeToList();
5745
5797
 
5746
- return _this46.handleTableData();
5798
+ return _this48.handleTableData();
5747
5799
  }
5748
5800
  }).then(function () {
5749
5801
  if (isExists) {
5750
- _this46.recalculate();
5802
+ _this48.recalculate();
5751
5803
  }
5752
5804
  });
5753
5805
  },
@@ -5877,18 +5929,18 @@ var Methods = {
5877
5929
  },
5878
5930
  // 计算可视渲染相关数据
5879
5931
  computeScrollLoad: function computeScrollLoad() {
5880
- var _this47 = this;
5932
+ var _this49 = this;
5881
5933
 
5882
5934
  return this.$nextTick().then(function () {
5883
- var sYOpts = _this47.sYOpts,
5884
- sXOpts = _this47.sXOpts,
5885
- scrollXLoad = _this47.scrollXLoad,
5886
- scrollYLoad = _this47.scrollYLoad,
5887
- scrollXStore = _this47.scrollXStore,
5888
- scrollYStore = _this47.scrollYStore; // 计算 X 逻辑
5935
+ var sYOpts = _this49.sYOpts,
5936
+ sXOpts = _this49.sXOpts,
5937
+ scrollXLoad = _this49.scrollXLoad,
5938
+ scrollYLoad = _this49.scrollYLoad,
5939
+ scrollXStore = _this49.scrollXStore,
5940
+ scrollYStore = _this49.scrollYStore; // 计算 X 逻辑
5889
5941
 
5890
5942
  if (scrollXLoad) {
5891
- var _computeVirtualX3 = computeVirtualX(_this47),
5943
+ var _computeVirtualX3 = computeVirtualX(_this49),
5892
5944
  visibleXSize = _computeVirtualX3.visibleSize;
5893
5945
 
5894
5946
  var offsetXSize = sXOpts.oSize ? _xeUtils.default.toNumber(sXOpts.oSize) : _dom.browse.msie ? 10 : _dom.browse.edge ? 5 : 0;
@@ -5896,13 +5948,13 @@ var Methods = {
5896
5948
  scrollXStore.visibleSize = visibleXSize;
5897
5949
  scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
5898
5950
 
5899
- _this47.updateScrollXData();
5951
+ _this49.updateScrollXData();
5900
5952
  } else {
5901
- _this47.updateScrollXSpace();
5953
+ _this49.updateScrollXSpace();
5902
5954
  } // 计算 Y 逻辑
5903
5955
 
5904
5956
 
5905
- var _computeVirtualY = computeVirtualY(_this47),
5957
+ var _computeVirtualY = computeVirtualY(_this49),
5906
5958
  rowHeight = _computeVirtualY.rowHeight,
5907
5959
  visibleYSize = _computeVirtualY.visibleSize;
5908
5960
 
@@ -5914,14 +5966,14 @@ var Methods = {
5914
5966
  scrollYStore.visibleSize = visibleYSize;
5915
5967
  scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
5916
5968
 
5917
- _this47.updateScrollYData();
5969
+ _this49.updateScrollYData();
5918
5970
  } else {
5919
- _this47.updateScrollYSpace();
5971
+ _this49.updateScrollYSpace();
5920
5972
  }
5921
5973
 
5922
- _this47.rowHeight = rowHeight;
5974
+ _this49.rowHeight = rowHeight;
5923
5975
 
5924
- _this47.$nextTick(_this47.updateStyle);
5976
+ _this49.$nextTick(_this49.updateStyle);
5925
5977
  });
5926
5978
  },
5927
5979
  handleTableColumn: function handleTableColumn() {
@@ -6035,7 +6087,7 @@ var Methods = {
6035
6087
  * @param {Number} scrollTop 上距离
6036
6088
  */
6037
6089
  scrollTo: function scrollTo(scrollLeft, scrollTop) {
6038
- var _this48 = this;
6090
+ var _this50 = this;
6039
6091
 
6040
6092
  var $refs = this.$refs;
6041
6093
  var tableBody = $refs.tableBody,
@@ -6056,7 +6108,7 @@ var Methods = {
6056
6108
  if (this.scrollXLoad || this.scrollYLoad) {
6057
6109
  return new Promise(function (resolve) {
6058
6110
  return setTimeout(function () {
6059
- return resolve(_this48.$nextTick());
6111
+ return resolve(_this50.$nextTick());
6060
6112
  }, 50);
6061
6113
  });
6062
6114
  }
@@ -6107,7 +6159,7 @@ var Methods = {
6107
6159
  * @param {Row} row 行对象
6108
6160
  */
6109
6161
  scrollToTreeRow: function scrollToTreeRow(row) {
6110
- var _this49 = this;
6162
+ var _this51 = this;
6111
6163
 
6112
6164
  var tableFullData = this.tableFullData,
6113
6165
  treeConfig = this.treeConfig,
@@ -6122,15 +6174,15 @@ var Methods = {
6122
6174
  if (matchObj) {
6123
6175
  var nodes = matchObj.nodes;
6124
6176
  nodes.forEach(function (row, index) {
6125
- if (index < nodes.length - 1 && !_this49.isTreeExpandByRow(row)) {
6126
- rests.push(_this49.setTreeExpand(row, true));
6177
+ if (index < nodes.length - 1 && !_this51.isTreeExpandByRow(row)) {
6178
+ rests.push(_this51.setTreeExpand(row, true));
6127
6179
  }
6128
6180
  });
6129
6181
  }
6130
6182
  }
6131
6183
 
6132
6184
  return Promise.all(rests).then(function () {
6133
- return _tools.DomTools.rowToVisible(_this49, row);
6185
+ return _tools.DomTools.rowToVisible(_this51, row);
6134
6186
  });
6135
6187
  },
6136
6188
 
@@ -6194,29 +6246,29 @@ var Methods = {
6194
6246
  * 如果单元格配置了校验规则,则会进行校验
6195
6247
  */
6196
6248
  updateStatus: function updateStatus(scope, cellValue) {
6197
- var _this50 = this;
6249
+ var _this52 = this;
6198
6250
 
6199
6251
  var customVal = !_xeUtils.default.isUndefined(cellValue);
6200
6252
  return this.$nextTick().then(function () {
6201
- var $refs = _this50.$refs,
6202
- editRules = _this50.editRules,
6203
- validStore = _this50.validStore;
6253
+ var $refs = _this52.$refs,
6254
+ editRules = _this52.editRules,
6255
+ validStore = _this52.validStore;
6204
6256
 
6205
6257
  if (scope && $refs.tableBody && editRules) {
6206
6258
  var row = scope.row,
6207
6259
  column = scope.column;
6208
6260
  var type = 'change';
6209
6261
 
6210
- if (_this50.hasCellRules(type, row, column)) {
6211
- var cell = _this50.getCell(row, column);
6262
+ if (_this52.hasCellRules(type, row, column)) {
6263
+ var cell = _this52.getCell(row, column);
6212
6264
 
6213
6265
  if (cell) {
6214
- return _this50.validCellRules(type, row, column, cellValue).then(function () {
6266
+ return _this52.validCellRules(type, row, column, cellValue).then(function () {
6215
6267
  if (customVal && validStore.visible) {
6216
6268
  setCellValue(row, column, cellValue);
6217
6269
  }
6218
6270
 
6219
- _this50.clearValidate();
6271
+ _this52.clearValidate();
6220
6272
  }).catch(function (_ref8) {
6221
6273
  var rule = _ref8.rule;
6222
6274
 
@@ -6224,7 +6276,7 @@ var Methods = {
6224
6276
  setCellValue(row, column, cellValue);
6225
6277
  }
6226
6278
 
6227
- _this50.showValidTooltip({
6279
+ _this52.showValidTooltip({
6228
6280
  rule: rule,
6229
6281
  row: row,
6230
6282
  column: column,
@@ -6245,7 +6297,7 @@ var Methods = {
6245
6297
  * @param {TableMergeConfig[]} merges { row: Row|number, column: ColumnInfo|number, rowspan: number, colspan: number }
6246
6298
  */
6247
6299
  setMergeCells: function setMergeCells(merges) {
6248
- var _this51 = this;
6300
+ var _this53 = this;
6249
6301
 
6250
6302
  if (this.spanMethod) {
6251
6303
  _tools.UtilTools.error('vxe.error.errConflicts', ['merge-cells', 'span-method']);
@@ -6253,7 +6305,7 @@ var Methods = {
6253
6305
 
6254
6306
  setMerges(this, merges, this.mergeList, this.afterFullData);
6255
6307
  return this.$nextTick().then(function () {
6256
- return _this51.updateCellAreas();
6308
+ return _this53.updateCellAreas();
6257
6309
  });
6258
6310
  },
6259
6311
 
@@ -6262,7 +6314,7 @@ var Methods = {
6262
6314
  * @param {TableMergeConfig[]} merges 多个或数组 [{row:Row|number, col:ColumnInfo|number}]
6263
6315
  */
6264
6316
  removeMergeCells: function removeMergeCells(merges) {
6265
- var _this52 = this;
6317
+ var _this54 = this;
6266
6318
 
6267
6319
  if (this.spanMethod) {
6268
6320
  _tools.UtilTools.error('vxe.error.errConflicts', ['merge-cells', 'span-method']);
@@ -6270,7 +6322,7 @@ var Methods = {
6270
6322
 
6271
6323
  var rest = removeMerges(this, merges, this.mergeList, this.afterFullData);
6272
6324
  return this.$nextTick().then(function () {
6273
- _this52.updateCellAreas();
6325
+ _this54.updateCellAreas();
6274
6326
 
6275
6327
  return rest;
6276
6328
  });
@@ -6294,7 +6346,7 @@ var Methods = {
6294
6346
  this.setMergeFooterItems(this.mergeFooterItems);
6295
6347
  },
6296
6348
  setMergeFooterItems: function setMergeFooterItems(merges) {
6297
- var _this53 = this;
6349
+ var _this55 = this;
6298
6350
 
6299
6351
  if (this.footerSpanMethod) {
6300
6352
  _tools.UtilTools.error('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
@@ -6302,11 +6354,11 @@ var Methods = {
6302
6354
 
6303
6355
  setMerges(this, merges, this.mergeFooterList, null);
6304
6356
  return this.$nextTick().then(function () {
6305
- return _this53.updateCellAreas();
6357
+ return _this55.updateCellAreas();
6306
6358
  });
6307
6359
  },
6308
6360
  removeMergeFooterItems: function removeMergeFooterItems(merges) {
6309
- var _this54 = this;
6361
+ var _this56 = this;
6310
6362
 
6311
6363
  if (this.footerSpanMethod) {
6312
6364
  _tools.UtilTools.error('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
@@ -6314,7 +6366,7 @@ var Methods = {
6314
6366
 
6315
6367
  var rest = removeMerges(this, merges, this.mergeFooterList, null);
6316
6368
  return this.$nextTick().then(function () {
6317
- _this54.updateCellAreas();
6369
+ _this56.updateCellAreas();
6318
6370
 
6319
6371
  return rest;
6320
6372
  });