vxe-table 4.12.0-beta.5 → 4.12.0-beta.7

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.
@@ -126,6 +126,7 @@ export default defineComponent({
126
126
  tfOns.onDblclick = (evnt) => {
127
127
  $xeTable.dispatchEvent('footer-cell-dblclick', Object.assign({ cell: evnt.currentTarget }, cellParams), evnt);
128
128
  };
129
+ let isMergeCell = false;
129
130
  // 合并行或列
130
131
  if (mergeFooterList.length) {
131
132
  const spanRest = mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex);
@@ -135,9 +136,11 @@ export default defineComponent({
135
136
  return null;
136
137
  }
137
138
  if (rowspan > 1) {
139
+ isMergeCell = true;
138
140
  attrs.rowspan = rowspan;
139
141
  }
140
142
  if (colspan > 1) {
143
+ isMergeCell = true;
141
144
  attrs.colspan = colspan;
142
145
  }
143
146
  }
@@ -158,8 +161,10 @@ export default defineComponent({
158
161
  const isLastColumn = $columnIndex === tableColumn.length - 1;
159
162
  const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
160
163
  let isVNPreEmptyStatus = false;
161
- if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
162
- isVNPreEmptyStatus = true;
164
+ if (!isMergeCell) {
165
+ if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
166
+ isVNPreEmptyStatus = true;
167
+ }
163
168
  }
164
169
  const tcStyle = {};
165
170
  if (hasEllipsis) {
@@ -9,7 +9,7 @@ import TableHeaderComponent from './header';
9
9
  import TableFooterComponent from './footer';
10
10
  import tableProps from './props';
11
11
  import tableEmits from './emits';
12
- import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth } from './util';
12
+ import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, updateDeepRowKey, updateFastRowKey } from './util';
13
13
  import { getSlotVNs } from '../../ui/src/vn';
14
14
  import { warnLog, errLog } from '../../ui/src/log';
15
15
  import TableCustomPanelComponent from '../module/custom/panel';
@@ -2651,7 +2651,7 @@ export default defineComponent({
2651
2651
  const { transform } = treeOpts;
2652
2652
  const childrenField = treeOpts.children || treeOpts.childrenField;
2653
2653
  let treeData = [];
2654
- let fullData = reactive(datas ? datas.slice(0) : []); // 转为响应式
2654
+ let fullData = reactive(datas ? datas.slice(0) : []); // 转为响应式数据
2655
2655
  if (treeConfig) {
2656
2656
  if (transform) {
2657
2657
  // 树结构自动转换
@@ -3745,7 +3745,7 @@ export default defineComponent({
3745
3745
  const { transform } = treeOpts;
3746
3746
  if (!keepSource) {
3747
3747
  if (process.env.NODE_ENV === 'development') {
3748
- warnLog('vxe.error.reqProp', ['keep-source']);
3748
+ errLog('vxe.error.reqProp', ['keep-source']);
3749
3749
  }
3750
3750
  return nextTick();
3751
3751
  }
@@ -3760,23 +3760,23 @@ export default defineComponent({
3760
3760
  }
3761
3761
  let reDelFlag = false;
3762
3762
  if (targetRows.length) {
3763
- targetRows.forEach((row) => {
3764
- if (!$xeTable.isInsertByRow(row)) {
3765
- const rowid = getRowid($xeTable, row);
3766
- const oRow = sourceDataRowIdData[rowid];
3767
- if (oRow && row) {
3768
- if (field) {
3769
- XEUtils.set(row, field, XEUtils.clone(XEUtils.get(oRow, field), true));
3770
- }
3771
- else {
3772
- XEUtils.destructuring(row, XEUtils.clone(oRow, true));
3773
- }
3774
- if (!fullDataRowIdData[rowid] && $xeTable.isRemoveByRow(row)) {
3775
- const rowRest = fullAllDataRowIdData[rowid];
3776
- if (rowRest) {
3777
- const reRow = rowRest.row;
3778
- tableFullData.unshift(reRow);
3779
- afterFullData.unshift(reRow);
3763
+ targetRows.forEach((item) => {
3764
+ const rowid = getRowid($xeTable, item);
3765
+ const rowRest = fullAllDataRowIdData[rowid];
3766
+ if (rowRest) {
3767
+ const row = rowRest.row;
3768
+ if (!$xeTable.isInsertByRow(row)) {
3769
+ const oRow = sourceDataRowIdData[rowid];
3770
+ if (oRow && row) {
3771
+ if (field) {
3772
+ XEUtils.set(row, field, XEUtils.clone(XEUtils.get(oRow, field), true));
3773
+ }
3774
+ else {
3775
+ XEUtils.destructuring(row, XEUtils.clone(oRow, true));
3776
+ }
3777
+ if (!fullDataRowIdData[rowid] && $xeTable.isRemoveByRow(row)) {
3778
+ tableFullData.unshift(row);
3779
+ afterFullData.unshift(row);
3780
3780
  reDelFlag = true;
3781
3781
  }
3782
3782
  }
@@ -6750,32 +6750,19 @@ export default defineComponent({
6750
6750
  const treeOpts = computeTreeOpts.value;
6751
6751
  const childrenField = treeOpts.children || treeOpts.childrenField;
6752
6752
  const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
6753
+ const { lazy } = treeOpts;
6753
6754
  const rowkey = getRowkey($xeTable);
6755
+ const isDeepKey = rowkey.indexOf('.') > -1;
6754
6756
  const fullAllDataRowIdMaps = Object.assign({}, fullAllDataRowIdData); // 存在已删除数据
6755
6757
  const fullDataRowIdMaps = {};
6756
6758
  const treeTempExpandedMaps = Object.assign({}, treeExpandedMaps);
6757
- const handleRow = (row, index, items, path, parentRow, nodes) => {
6758
- let rowid = getRowid($xeTable, row);
6759
- const seq = treeConfig && path ? toTreePathSeq(path) : index + 1;
6760
- const level = nodes ? nodes.length - 1 : 0;
6761
- if (eqEmptyValue(rowid)) {
6762
- rowid = getRowUniqueId();
6763
- XEUtils.set(row, rowkey, rowid);
6764
- }
6765
- if (treeConfig && treeOpts.lazy) {
6766
- const treeExpRest = treeExpandedMaps[rowid];
6767
- if (row[hasChildField] && XEUtils.isUndefined(row[childrenField])) {
6768
- row[childrenField] = null;
6769
- }
6770
- if (treeExpRest) {
6771
- if (!row[childrenField] || !row[childrenField].length) {
6772
- delete treeTempExpandedMaps[rowid];
6773
- }
6774
- }
6775
- }
6776
- let rowRest = fullAllDataRowIdData[rowid];
6759
+ const handleRowId = isDeepKey ? updateDeepRowKey : updateFastRowKey;
6760
+ const handleRowCache = (row, index, items, currIndex, parentRow, rowid, level, seq) => {
6761
+ let rowRest = fullAllDataRowIdMaps[rowid];
6777
6762
  if (!rowRest) {
6778
6763
  rowRest = { row, rowid, seq, index: -1, _index: -1, $index: -1, treeIndex: index, items, parent: parentRow, level, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 };
6764
+ fullDataRowIdMaps[rowid] = rowRest;
6765
+ fullAllDataRowIdMaps[rowid] = rowRest;
6779
6766
  }
6780
6767
  rowRest.treeLoaded = false;
6781
6768
  rowRest.expandLoaded = false;
@@ -6783,15 +6770,30 @@ export default defineComponent({
6783
6770
  rowRest.items = items;
6784
6771
  rowRest.parent = parentRow;
6785
6772
  rowRest.level = level;
6786
- rowRest.index = treeConfig && parentRow ? -1 : index;
6787
- fullDataRowIdMaps[rowid] = rowRest;
6788
- fullAllDataRowIdMaps[rowid] = rowRest;
6773
+ rowRest.index = currIndex;
6774
+ rowRest.treeIndex = index;
6789
6775
  };
6790
6776
  if (treeConfig) {
6791
- XEUtils.eachTree(tableFullTreeData, handleRow, { children: childrenField });
6777
+ XEUtils.eachTree(tableFullTreeData, (row, index, items, path, parentRow, nodes) => {
6778
+ const rowid = handleRowId(row, rowkey);
6779
+ if (treeConfig && lazy) {
6780
+ const treeExpRest = treeTempExpandedMaps[rowid];
6781
+ if (row[hasChildField] && row[childrenField] === undefined) {
6782
+ row[childrenField] = null;
6783
+ }
6784
+ if (treeExpRest) {
6785
+ if (!row[childrenField] || !row[childrenField].length) {
6786
+ delete treeTempExpandedMaps[rowid];
6787
+ }
6788
+ }
6789
+ }
6790
+ handleRowCache(row, index, items, parentRow ? -1 : index, parentRow, rowid, nodes.length - 1, toTreePathSeq(path));
6791
+ }, { children: childrenField });
6792
6792
  }
6793
6793
  else {
6794
- tableFullData.forEach(handleRow);
6794
+ tableFullData.forEach((row, index, items) => {
6795
+ handleRowCache(row, index, items, index, null, handleRowId(row, rowkey), 0, index + 1);
6796
+ });
6795
6797
  }
6796
6798
  internalData.fullDataRowIdData = fullDataRowIdMaps;
6797
6799
  internalData.fullAllDataRowIdData = fullAllDataRowIdMaps;
@@ -2,6 +2,7 @@ import { watch, reactive } from 'vue';
2
2
  import XEUtils from 'xe-utils';
3
3
  import { ColumnInfo } from './columnInfo';
4
4
  import { isPx, isScale } from '../../ui/src/dom';
5
+ import { eqEmptyValue } from '../../ui/src/utils';
5
6
  const getAllConvertColumns = (columns, parentColumn) => {
6
7
  const result = [];
7
8
  columns.forEach((column) => {
@@ -90,14 +91,33 @@ export function getRowUniqueId() {
90
91
  export function getRowkey($xeTable) {
91
92
  const { props } = $xeTable;
92
93
  const { computeRowOpts } = $xeTable.getComputeMaps();
93
- const { rowId } = props;
94
94
  const rowOpts = computeRowOpts.value;
95
- return rowId || rowOpts.keyField || '_X_ROW_KEY';
95
+ return `${props.rowId || rowOpts.keyField || '_X_ROW_KEY'}`;
96
96
  }
97
97
  // 行主键 value
98
98
  export function getRowid($xeTable, row) {
99
99
  const rowid = XEUtils.get(row, getRowkey($xeTable));
100
- return XEUtils.eqNull(rowid) ? '' : encodeURIComponent(rowid);
100
+ return encodeRowid(rowid);
101
+ }
102
+ // 编码行主键
103
+ export function encodeRowid(rowVal) {
104
+ return XEUtils.eqNull(rowVal) ? '' : encodeURIComponent(rowVal);
105
+ }
106
+ export function updateDeepRowKey(row, rowkey) {
107
+ let rowid = XEUtils.get(row, rowkey);
108
+ if (eqEmptyValue(rowid)) {
109
+ rowid = getRowUniqueId();
110
+ XEUtils.set(row, rowkey, rowid);
111
+ }
112
+ return rowid;
113
+ }
114
+ export function updateFastRowKey(row, rowkey) {
115
+ let rowid = row[rowkey];
116
+ if (eqEmptyValue(rowid)) {
117
+ rowid = getRowUniqueId();
118
+ row[rowkey] = rowid;
119
+ }
120
+ return rowid;
101
121
  }
102
122
  export const handleFieldOrColumn = ($xeTable, fieldOrColumn) => {
103
123
  if (fieldOrColumn) {
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  import { getFuncText } from './src/utils';
3
- export const version = "4.12.0-beta.5";
3
+ export const version = "4.12.0-beta.7";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
package/es/ui/src/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const version = `table v${"4.12.0-beta.5"}`;
3
+ const version = `table v${"4.12.0-beta.7"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
3138
3138
  ;// ./packages/ui/index.ts
3139
3139
 
3140
3140
 
3141
- const version = "4.12.0-beta.5";
3141
+ const version = "4.12.0-beta.7";
3142
3142
  core_.VxeUI.version = version;
3143
3143
  core_.VxeUI.tableVersion = version;
3144
3144
  core_.VxeUI.setConfig({
@@ -3586,7 +3586,7 @@ var esnext_iterator_some = __webpack_require__(7550);
3586
3586
  const {
3587
3587
  log: log_log
3588
3588
  } = core_.VxeUI;
3589
- const log_version = `table v${"4.12.0-beta.5"}`;
3589
+ const log_version = `table v${"4.12.0-beta.7"}`;
3590
3590
  const warnLog = log_log.create('warn', log_version);
3591
3591
  const errLog = log_log.create('error', log_version);
3592
3592
  ;// ./packages/table/src/columnInfo.ts
@@ -3960,6 +3960,7 @@ function isNodeElement(elem) {
3960
3960
 
3961
3961
 
3962
3962
 
3963
+
3963
3964
  const getAllConvertColumns = (columns, parentColumn) => {
3964
3965
  const result = [];
3965
3966
  columns.forEach(column => {
@@ -4049,16 +4050,33 @@ function getRowkey($xeTable) {
4049
4050
  const {
4050
4051
  computeRowOpts
4051
4052
  } = $xeTable.getComputeMaps();
4052
- const {
4053
- rowId
4054
- } = props;
4055
4053
  const rowOpts = computeRowOpts.value;
4056
- return rowId || rowOpts.keyField || '_X_ROW_KEY';
4054
+ return `${props.rowId || rowOpts.keyField || '_X_ROW_KEY'}`;
4057
4055
  }
4058
4056
  // 行主键 value
4059
4057
  function getRowid($xeTable, row) {
4060
4058
  const rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, getRowkey($xeTable));
4061
- return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(rowid) ? '' : encodeURIComponent(rowid);
4059
+ return encodeRowid(rowid);
4060
+ }
4061
+ // 编码行主键
4062
+ function encodeRowid(rowVal) {
4063
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(rowVal) ? '' : encodeURIComponent(rowVal);
4064
+ }
4065
+ function updateDeepRowKey(row, rowkey) {
4066
+ let rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, rowkey);
4067
+ if (eqEmptyValue(rowid)) {
4068
+ rowid = getRowUniqueId();
4069
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, rowkey, rowid);
4070
+ }
4071
+ return rowid;
4072
+ }
4073
+ function updateFastRowKey(row, rowkey) {
4074
+ let rowid = row[rowkey];
4075
+ if (eqEmptyValue(rowid)) {
4076
+ rowid = getRowUniqueId();
4077
+ row[rowkey] = rowid;
4078
+ }
4079
+ return rowid;
4062
4080
  }
4063
4081
  const handleFieldOrColumn = ($xeTable, fieldOrColumn) => {
4064
4082
  if (fieldOrColumn) {
@@ -6462,6 +6480,7 @@ const renderType = 'body';
6462
6480
  tdOns.onDblclick = evnt => {
6463
6481
  $xeTable.triggerCellDblclickEvent(evnt, cellParams);
6464
6482
  };
6483
+ let isMergeCell = false;
6465
6484
  // 合并行或列
6466
6485
  if (mergeList.length) {
6467
6486
  const spanRest = mergeBodyMethod(mergeList, _rowIndex, _columnIndex);
@@ -6474,9 +6493,11 @@ const renderType = 'body';
6474
6493
  return null;
6475
6494
  }
6476
6495
  if (rowspan > 1) {
6496
+ isMergeCell = true;
6477
6497
  tdAttrs.rowspan = rowspan;
6478
6498
  }
6479
6499
  if (colspan > 1) {
6500
+ isMergeCell = true;
6480
6501
  tdAttrs.colspan = colspan;
6481
6502
  }
6482
6503
  }
@@ -6511,11 +6532,13 @@ const renderType = 'body';
6511
6532
  const isLastColumn = $columnIndex === columns.length - 1;
6512
6533
  const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
6513
6534
  let isVNPreEmptyStatus = false;
6514
- if (!dragRow || getRowid($xeTable, dragRow) !== rowid) {
6515
- if (scrollYLoad && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
6516
- isVNPreEmptyStatus = true;
6517
- } else if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
6518
- isVNPreEmptyStatus = true;
6535
+ if (!isMergeCell) {
6536
+ if (!dragRow || getRowid($xeTable, dragRow) !== rowid) {
6537
+ if (scrollYLoad && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
6538
+ isVNPreEmptyStatus = true;
6539
+ } else if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
6540
+ isVNPreEmptyStatus = true;
6541
+ }
6519
6542
  }
6520
6543
  }
6521
6544
  const tcStyle = {};
@@ -7704,6 +7727,7 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
7704
7727
  cell: evnt.currentTarget
7705
7728
  }, cellParams), evnt);
7706
7729
  };
7730
+ let isMergeCell = false;
7707
7731
  // 合并行或列
7708
7732
  if (mergeFooterList.length) {
7709
7733
  const spanRest = mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex);
@@ -7716,9 +7740,11 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
7716
7740
  return null;
7717
7741
  }
7718
7742
  if (rowspan > 1) {
7743
+ isMergeCell = true;
7719
7744
  attrs.rowspan = rowspan;
7720
7745
  }
7721
7746
  if (colspan > 1) {
7747
+ isMergeCell = true;
7722
7748
  attrs.colspan = colspan;
7723
7749
  }
7724
7750
  }
@@ -7741,8 +7767,10 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
7741
7767
  const isLastColumn = $columnIndex === tableColumn.length - 1;
7742
7768
  const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
7743
7769
  let isVNPreEmptyStatus = false;
7744
- if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
7745
- isVNPreEmptyStatus = true;
7770
+ if (!isMergeCell) {
7771
+ if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
7772
+ isVNPreEmptyStatus = true;
7773
+ }
7746
7774
  }
7747
7775
  const tcStyle = {};
7748
7776
  if (hasEllipsis) {
@@ -13428,7 +13456,7 @@ const maxXWidth = 5e6;
13428
13456
  } = treeOpts;
13429
13457
  const childrenField = treeOpts.children || treeOpts.childrenField;
13430
13458
  let treeData = [];
13431
- let fullData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(datas ? datas.slice(0) : []); // 转为响应式
13459
+ let fullData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(datas ? datas.slice(0) : []); // 转为响应式数据
13432
13460
  if (treeConfig) {
13433
13461
  if (transform) {
13434
13462
  // 树结构自动转换
@@ -14688,7 +14716,7 @@ const maxXWidth = 5e6;
14688
14716
  } = treeOpts;
14689
14717
  if (!keepSource) {
14690
14718
  if (true) {
14691
- warnLog('vxe.error.reqProp', ['keep-source']);
14719
+ errLog('vxe.error.reqProp', ['keep-source']);
14692
14720
  }
14693
14721
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
14694
14722
  }
@@ -14702,22 +14730,22 @@ const maxXWidth = 5e6;
14702
14730
  }
14703
14731
  let reDelFlag = false;
14704
14732
  if (targetRows.length) {
14705
- targetRows.forEach(row => {
14706
- if (!$xeTable.isInsertByRow(row)) {
14707
- const rowid = getRowid($xeTable, row);
14708
- const oRow = sourceDataRowIdData[rowid];
14709
- if (oRow && row) {
14710
- if (field) {
14711
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, field, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(oRow, field), true));
14712
- } else {
14713
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().destructuring(row, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(oRow, true));
14714
- }
14715
- if (!fullDataRowIdData[rowid] && $xeTable.isRemoveByRow(row)) {
14716
- const rowRest = fullAllDataRowIdData[rowid];
14717
- if (rowRest) {
14718
- const reRow = rowRest.row;
14719
- tableFullData.unshift(reRow);
14720
- afterFullData.unshift(reRow);
14733
+ targetRows.forEach(item => {
14734
+ const rowid = getRowid($xeTable, item);
14735
+ const rowRest = fullAllDataRowIdData[rowid];
14736
+ if (rowRest) {
14737
+ const row = rowRest.row;
14738
+ if (!$xeTable.isInsertByRow(row)) {
14739
+ const oRow = sourceDataRowIdData[rowid];
14740
+ if (oRow && row) {
14741
+ if (field) {
14742
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, field, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(oRow, field), true));
14743
+ } else {
14744
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().destructuring(row, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(oRow, true));
14745
+ }
14746
+ if (!fullDataRowIdData[rowid] && $xeTable.isRemoveByRow(row)) {
14747
+ tableFullData.unshift(row);
14748
+ afterFullData.unshift(row);
14721
14749
  reDelFlag = true;
14722
14750
  }
14723
14751
  }
@@ -18088,7 +18116,11 @@ const maxXWidth = 5e6;
18088
18116
  const treeOpts = computeTreeOpts.value;
18089
18117
  const childrenField = treeOpts.children || treeOpts.childrenField;
18090
18118
  const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
18119
+ const {
18120
+ lazy
18121
+ } = treeOpts;
18091
18122
  const rowkey = getRowkey($xeTable);
18123
+ const isDeepKey = rowkey.indexOf('.') > -1;
18092
18124
  const fullAllDataRowIdMaps = {
18093
18125
  ...fullAllDataRowIdData
18094
18126
  }; // 存在已删除数据
@@ -18096,26 +18128,9 @@ const maxXWidth = 5e6;
18096
18128
  const treeTempExpandedMaps = {
18097
18129
  ...treeExpandedMaps
18098
18130
  };
18099
- const handleRow = (row, index, items, path, parentRow, nodes) => {
18100
- let rowid = getRowid($xeTable, row);
18101
- const seq = treeConfig && path ? toTreePathSeq(path) : index + 1;
18102
- const level = nodes ? nodes.length - 1 : 0;
18103
- if (eqEmptyValue(rowid)) {
18104
- rowid = getRowUniqueId();
18105
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, rowkey, rowid);
18106
- }
18107
- if (treeConfig && treeOpts.lazy) {
18108
- const treeExpRest = treeExpandedMaps[rowid];
18109
- if (row[hasChildField] && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(row[childrenField])) {
18110
- row[childrenField] = null;
18111
- }
18112
- if (treeExpRest) {
18113
- if (!row[childrenField] || !row[childrenField].length) {
18114
- delete treeTempExpandedMaps[rowid];
18115
- }
18116
- }
18117
- }
18118
- let rowRest = fullAllDataRowIdData[rowid];
18131
+ const handleRowId = isDeepKey ? updateDeepRowKey : updateFastRowKey;
18132
+ const handleRowCache = (row, index, items, currIndex, parentRow, rowid, level, seq) => {
18133
+ let rowRest = fullAllDataRowIdMaps[rowid];
18119
18134
  if (!rowRest) {
18120
18135
  rowRest = {
18121
18136
  row,
@@ -18133,6 +18148,8 @@ const maxXWidth = 5e6;
18133
18148
  oTop: 0,
18134
18149
  expandHeight: 0
18135
18150
  };
18151
+ fullDataRowIdMaps[rowid] = rowRest;
18152
+ fullAllDataRowIdMaps[rowid] = rowRest;
18136
18153
  }
18137
18154
  rowRest.treeLoaded = false;
18138
18155
  rowRest.expandLoaded = false;
@@ -18140,16 +18157,31 @@ const maxXWidth = 5e6;
18140
18157
  rowRest.items = items;
18141
18158
  rowRest.parent = parentRow;
18142
18159
  rowRest.level = level;
18143
- rowRest.index = treeConfig && parentRow ? -1 : index;
18144
- fullDataRowIdMaps[rowid] = rowRest;
18145
- fullAllDataRowIdMaps[rowid] = rowRest;
18160
+ rowRest.index = currIndex;
18161
+ rowRest.treeIndex = index;
18146
18162
  };
18147
18163
  if (treeConfig) {
18148
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData, handleRow, {
18164
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData, (row, index, items, path, parentRow, nodes) => {
18165
+ const rowid = handleRowId(row, rowkey);
18166
+ if (treeConfig && lazy) {
18167
+ const treeExpRest = treeTempExpandedMaps[rowid];
18168
+ if (row[hasChildField] && row[childrenField] === undefined) {
18169
+ row[childrenField] = null;
18170
+ }
18171
+ if (treeExpRest) {
18172
+ if (!row[childrenField] || !row[childrenField].length) {
18173
+ delete treeTempExpandedMaps[rowid];
18174
+ }
18175
+ }
18176
+ }
18177
+ handleRowCache(row, index, items, parentRow ? -1 : index, parentRow, rowid, nodes.length - 1, toTreePathSeq(path));
18178
+ }, {
18149
18179
  children: childrenField
18150
18180
  });
18151
18181
  } else {
18152
- tableFullData.forEach(handleRow);
18182
+ tableFullData.forEach((row, index, items) => {
18183
+ handleRowCache(row, index, items, index, null, handleRowId(row, rowkey), 0, index + 1);
18184
+ });
18153
18185
  }
18154
18186
  internalData.fullDataRowIdData = fullDataRowIdMaps;
18155
18187
  internalData.fullAllDataRowIdData = fullAllDataRowIdMaps;