@hailin-zheng/editor-core 1.1.25 → 1.1.26

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
@@ -3693,7 +3693,7 @@ class DocumentFooterRenderObject extends BlockContainerRenderObject {
3693
3693
  const { render, position } = e;
3694
3694
  render.tran(() => {
3695
3695
  //判断页眉是否为输入内容
3696
- const isFooterEmpty = ElementUtil.checkEmptyContent(this);
3696
+ const isFooterEmpty = ElementUtil.checkEmptyRenderContent(this);
3697
3697
  if (this.element.disableClick && render.drawMode === 'view') {
3698
3698
  if (isFooterEmpty) {
3699
3699
  render.contentContext.setGlobalAlpha(0);
@@ -3770,7 +3770,7 @@ class DocumentHeaderRenderObject extends BlockContainerRenderObject {
3770
3770
  const { render, position } = e;
3771
3771
  render.tran(() => {
3772
3772
  //判断页眉是否为输入内容
3773
- const isHeaderEmpty = ElementUtil.checkEmptyContent(this);
3773
+ const isHeaderEmpty = ElementUtil.checkEmptyRenderContent(this);
3774
3774
  //存在输入内容时,绘制页眉-页体分割线
3775
3775
  if (!isHeaderEmpty || !this.element.disableClick) {
3776
3776
  const headerLineY = this.rect.height;
@@ -7472,7 +7472,7 @@ class ElementUtil {
7472
7472
  * 校验是否为空内容
7473
7473
  * @param ele
7474
7474
  */
7475
- static checkEmptyContent(ele) {
7475
+ static checkEmptyRenderContent(ele) {
7476
7476
  if (ele.length === 1) {
7477
7477
  const firstRender = ele.getChild(0);
7478
7478
  if (firstRender instanceof ParagraphRenderObject) {
@@ -17314,6 +17314,9 @@ class ElementTrackManage {
17314
17314
  //ele获取的为父容器
17315
17315
  if (index === parentIndex + 1) {
17316
17316
  if (ele instanceof BranchElement) {
17317
+ if (ele.type === 'tbc' && ele.getChildLength() === 2) {
17318
+ ele.clearItems();
17319
+ }
17317
17320
  ele.addChild(target, 0);
17318
17321
  return;
17319
17322
  }