vxe-table 3.13.9 → 3.13.10

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.
@@ -259,8 +259,7 @@ function cacheColumnMap($xeTable) {
259
259
  index,
260
260
  items,
261
261
  parent: parentColumn || null,
262
- width: 0,
263
- oLeft: 0
262
+ width: 0
264
263
  };
265
264
  if (field) {
266
265
  if (fullColumnFieldData[field]) {
@@ -1838,21 +1837,6 @@ function handleScrollToRowColumn($xeTable, fieldOrColumn, row) {
1838
1837
  }
1839
1838
  return $xeTable.$nextTick();
1840
1839
  }
1841
- const handleRowExpandReserve = ($xeTable, row, expanded) => {
1842
- const internalData = $xeTable;
1843
- const {
1844
- rowExpandedReserveRowMap
1845
- } = internalData;
1846
- const expandOpts = $xeTable.computeExpandOpts;
1847
- if (expandOpts.reserve) {
1848
- const rowid = (0, _util.getRowid)($xeTable, row);
1849
- if (expanded) {
1850
- rowExpandedReserveRowMap[rowid] = row;
1851
- } else if (rowExpandedReserveRowMap[rowid]) {
1852
- delete rowExpandedReserveRowMap[rowid];
1853
- }
1854
- }
1855
- };
1856
1840
  // 计算可视渲染相关数据
1857
1841
  function computeScrollLoad($xeTable) {
1858
1842
  const reactData = $xeTable;
@@ -8669,7 +8653,7 @@ const Methods = {
8669
8653
  });
8670
8654
  }
8671
8655
  if (reserve) {
8672
- validRows.forEach(row => handleRowExpandReserve($xeTable, row, expanded));
8656
+ validRows.forEach(row => this.handleRowExpandReserve(row, expanded));
8673
8657
  }
8674
8658
  }
8675
8659
  this.rowExpandedMaps = rExpandedMaps;
@@ -8704,32 +8688,42 @@ const Methods = {
8704
8688
  */
8705
8689
  clearRowExpand() {
8706
8690
  const $xeTable = this;
8707
- const reactData = $xeTable;
8708
- const internalData = $xeTable;
8709
8691
  const {
8692
+ expandOpts,
8710
8693
  tableFullData
8711
- } = internalData;
8712
- const expandOpts = $xeTable.computeExpandOpts;
8694
+ } = this;
8713
8695
  const {
8714
8696
  reserve
8715
8697
  } = expandOpts;
8716
- const expList = $xeTable.getRowExpandRecords();
8717
- reactData.rowExpandedMaps = {};
8698
+ const expList = this.getRowExpandRecords();
8699
+ this.rowExpandedMaps = {};
8718
8700
  if (reserve) {
8719
- tableFullData.forEach(row => handleRowExpandReserve($xeTable, row, false));
8701
+ tableFullData.forEach(row => this.handleRowExpandReserve(row, false));
8720
8702
  }
8721
- return $xeTable.$nextTick().then(() => {
8703
+ return this.$nextTick().then(() => {
8722
8704
  if (expList.length) {
8723
- return $xeTable.recalculate();
8705
+ this.recalculate();
8724
8706
  }
8725
- }).then(() => {
8726
- return $xeTable.updateCellAreas();
8727
- });
8707
+ }).then(() => $xeTable.updateCellAreas());
8728
8708
  },
8729
8709
  clearRowExpandReserve() {
8730
8710
  this.rowExpandedReserveRowMap = {};
8731
8711
  return this.$nextTick();
8732
8712
  },
8713
+ handleRowExpandReserve(row, expanded) {
8714
+ const {
8715
+ rowExpandedReserveRowMap,
8716
+ expandOpts
8717
+ } = this;
8718
+ if (expandOpts.reserve) {
8719
+ const rowid = (0, _util.getRowid)(this, row);
8720
+ if (expanded) {
8721
+ rowExpandedReserveRowMap[rowid] = row;
8722
+ } else if (rowExpandedReserveRowMap[rowid]) {
8723
+ delete rowExpandedReserveRowMap[rowid];
8724
+ }
8725
+ }
8726
+ },
8733
8727
  getRowExpandRecords() {
8734
8728
  const rest = [];
8735
8729
  _xeUtils.default.each(this.rowExpandedMaps, item => {