vxe-table 3.13.20 → 3.13.21

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.
@@ -3011,24 +3011,26 @@ const Methods = {
3011
3011
  reactData.treeExpandedMaps = treeTempExpandedMaps;
3012
3012
  },
3013
3013
  cacheSourceMap(fullData) {
3014
+ const $xeTable = this;
3015
+ const props = $xeTable;
3016
+ const internalData = $xeTable;
3017
+ const {
3018
+ treeConfig
3019
+ } = props;
3020
+ const treeOpts = $xeTable.computeTreeOpts;
3014
3021
  let {
3015
- treeConfig,
3016
- treeOpts,
3017
3022
  sourceDataRowIdData
3018
- } = this;
3023
+ } = internalData;
3019
3024
  const sourceData = _xeUtils.default.clone(fullData, true);
3020
- const rowkey = (0, _util.getRowkey)(this);
3021
- sourceDataRowIdData = this.sourceDataRowIdData = {};
3025
+ const rowkey = (0, _util.getRowkey)($xeTable);
3026
+ sourceDataRowIdData = internalData.sourceDataRowIdData = {};
3022
3027
  const handleSourceRow = row => {
3023
- let rowid = (0, _util.getRowid)(this, row);
3028
+ let rowid = (0, _util.getRowid)($xeTable, row);
3024
3029
  if ((0, _utils.eqEmptyValue)(rowid)) {
3025
3030
  rowid = (0, _util.getRowUniqueId)();
3026
3031
  _xeUtils.default.set(row, rowkey, rowid);
3027
3032
  }
3028
- sourceDataRowIdData[rowid] = {
3029
- row,
3030
- rowid
3031
- };
3033
+ sourceDataRowIdData[rowid] = row;
3032
3034
  };
3033
3035
  // 源数据缓存
3034
3036
  if (treeConfig) {
@@ -3039,7 +3041,7 @@ const Methods = {
3039
3041
  } else {
3040
3042
  sourceData.forEach(handleSourceRow);
3041
3043
  }
3042
- this.tableSourceData = sourceData;
3044
+ internalData.tableSourceData = sourceData;
3043
3045
  },
3044
3046
  getParams() {
3045
3047
  return this.params;
@@ -3417,6 +3419,9 @@ const Methods = {
3417
3419
  keepSource,
3418
3420
  treeConfig
3419
3421
  } = props;
3422
+ const {
3423
+ editStore
3424
+ } = reactData;
3420
3425
  const {
3421
3426
  fullAllDataRowIdData,
3422
3427
  fullDataRowIdData,
@@ -3425,6 +3430,7 @@ const Methods = {
3425
3430
  tableFullData,
3426
3431
  afterFullData
3427
3432
  } = internalData;
3433
+ const removeTempMaps = Object.assign({}, editStore.removeMaps);
3428
3434
  const treeOpts = $xeTable.computeTreeOpts;
3429
3435
  const {
3430
3436
  transform
@@ -3459,6 +3465,7 @@ const Methods = {
3459
3465
  _xeUtils.default.destructuring(row, _xeUtils.default.clone(oRow, true));
3460
3466
  }
3461
3467
  if (!fullDataRowIdData[rowid] && $xeTable.isRemoveByRow(row)) {
3468
+ delete removeTempMaps[rowid];
3462
3469
  tableFullData.unshift(row);
3463
3470
  afterFullData.unshift(row);
3464
3471
  reDelFlag = true;
@@ -3470,6 +3477,7 @@ const Methods = {
3470
3477
  }
3471
3478
  if (rows) {
3472
3479
  if (reDelFlag) {
3480
+ editStore.removeMaps = removeTempMaps;
3473
3481
  $xeTable.updateFooter();
3474
3482
  $xeTable.cacheRowMap(false);
3475
3483
  $xeTable.handleTableData(treeConfig && transform);