@hailin-zheng/editor-core 1.1.30 → 1.1.31

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
@@ -680,10 +680,6 @@ function appendToOps(doc, ele, ops) {
680
680
  ele,
681
681
  ops
682
682
  };
683
- if (log.prevIndex === -1) {
684
- const nextEle = ElementUtil.getNextSiblingElement(ele);
685
- log.nextIndex = nextEle ? ElementUtil.getControlIndex(nextEle, true) : -1;
686
- }
687
683
  array.push(log);
688
684
  }
689
685
  function inputText(ele, startIndex, input) {
@@ -774,14 +770,15 @@ function generatePatch(doc) {
774
770
  if (!ops || !ops.length) {
775
771
  return [];
776
772
  }
777
- const delOpsMap = getDeleteEleOps(ops);
773
+ getDeleteEleOps(ops);
778
774
  for (let i = 0; i < ops.length; i++) {
779
775
  const op = ops[i];
780
776
  const ele = op.ele;
781
777
  //修改样式
782
778
  if ('format' in op.ops) {
783
779
  //修改插入或者删除的不做处理
784
- if (insertOpsMap.has(ele) || delOpsMap.has(ele)) {
780
+ //|| delOpsMap.has(ele)
781
+ if (insertOpsMap.has(ele)) {
785
782
  continue;
786
783
  }
787
784
  //合并操作属性
@@ -5118,8 +5115,8 @@ class TableUtil {
5118
5115
  const hMergeEndIndex = this.getHMergeEndIndex(tb, i, colIndex);
5119
5116
  //当前单元格处于合并行的最后一行,并且合并的行数为2行
5120
5117
  if (hMergeEndIndex === colIndex && hMergeEndIndex - hMergeStartIndex === 1) {
5121
- const masterVMergeCell = tb.getChild(hMergeStartIndex).getChild(i);
5122
- masterVMergeCell.props.hMerge = null;
5118
+ const masterHMergeCell = tb.getChild(i).getChild(hMergeStartIndex);
5119
+ masterHMergeCell.props.hMerge = null;
5123
5120
  }
5124
5121
  }
5125
5122
  row.removeChild(cell);