@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-cjs.js CHANGED
@@ -9045,7 +9045,7 @@ class ColumnPatchUtil {
9045
9045
  //要分割的列坐标
9046
9046
  const newLinePointMap = this.getLinePointMap(splitCols);
9047
9047
  const resArray = new Set();
9048
- const allPointMap = oldLinePointMap.concat(newLinePointMap);
9048
+ const allPointMap = oldLinePointMap.concat(newLinePointMap).sort((a, b) => a.index - b.index);
9049
9049
  for (let i = 0; i < allPointMap.length; i++) {
9050
9050
  const part = allPointMap[i];
9051
9051
  resArray.add(part.offset);
@@ -9370,6 +9370,8 @@ class TableSplitCell {
9370
9370
  const splitCols = this.getSplitCols(colsWidth, cols);
9371
9371
  const [otherPacks, currPacks] = ColumnPatchUtil.getPatchPacks(hMergeCols, splitCols);
9372
9372
  this.applyHorSplitColumnPatchPacks(tb, focusRowIndex, 1, otherPacks);
9373
+ //当前单元格执行补丁前,需要先还原单元格
9374
+ TableUtil.restoreCell(ss);
9373
9375
  this.applyHorSplitColumnCurrPatchPacks(tb, focusRowIndex, focusCellIndex, rows, currPacks);
9374
9376
  tb.pubOnChange('to-child');
9375
9377
  tb.refreshView();
@@ -9433,7 +9435,6 @@ class TableSplitCell {
9433
9435
  static applyHorSplitColumnCurrPatchPacks(tb, focusRowIndex, focusColInex, splitRows, packs) {
9434
9436
  //获取当前列的合并行数
9435
9437
  let vMergeRows = this.getVMergeRowsCount(tb, focusRowIndex, focusColInex);
9436
- vMergeRows = vMergeRows === 1 ? 0 : vMergeRows;
9437
9438
  const startRow = tb.getChild(focusRowIndex);
9438
9439
  const endRow = tb.getChild(focusRowIndex + vMergeRows - 1);
9439
9440
  for (let i = 0; i < packs.length; i++) {