@hailin-zheng/editor-core 1.1.13 → 1.1.14

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.
package/index.js CHANGED
@@ -9016,7 +9016,7 @@ class ColumnPatchUtil {
9016
9016
  //要分割的列坐标
9017
9017
  const newLinePointMap = this.getLinePointMap(splitCols);
9018
9018
  const resArray = new Set();
9019
- const allPointMap = oldLinePointMap.concat(newLinePointMap);
9019
+ const allPointMap = oldLinePointMap.concat(newLinePointMap).sort((a, b) => a.index - b.index);
9020
9020
  for (let i = 0; i < allPointMap.length; i++) {
9021
9021
  const part = allPointMap[i];
9022
9022
  resArray.add(part.offset);
@@ -9341,6 +9341,8 @@ class TableSplitCell {
9341
9341
  const splitCols = this.getSplitCols(colsWidth, cols);
9342
9342
  const [otherPacks, currPacks] = ColumnPatchUtil.getPatchPacks(hMergeCols, splitCols);
9343
9343
  this.applyHorSplitColumnPatchPacks(tb, focusRowIndex, 1, otherPacks);
9344
+ //当前单元格执行补丁前,需要先还原单元格
9345
+ TableUtil.restoreCell(ss);
9344
9346
  this.applyHorSplitColumnCurrPatchPacks(tb, focusRowIndex, focusCellIndex, rows, currPacks);
9345
9347
  tb.pubOnChange('to-child');
9346
9348
  tb.refreshView();
@@ -9404,7 +9406,6 @@ class TableSplitCell {
9404
9406
  static applyHorSplitColumnCurrPatchPacks(tb, focusRowIndex, focusColInex, splitRows, packs) {
9405
9407
  //获取当前列的合并行数
9406
9408
  let vMergeRows = this.getVMergeRowsCount(tb, focusRowIndex, focusColInex);
9407
- vMergeRows = vMergeRows === 1 ? 0 : vMergeRows;
9408
9409
  const startRow = tb.getChild(focusRowIndex);
9409
9410
  const endRow = tb.getChild(focusRowIndex + vMergeRows - 1);
9410
9411
  for (let i = 0; i < packs.length; i++) {