@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.js CHANGED
@@ -3664,7 +3664,7 @@ class DocumentFooterRenderObject extends BlockContainerRenderObject {
3664
3664
  const { render, position } = e;
3665
3665
  render.tran(() => {
3666
3666
  //判断页眉是否为输入内容
3667
- const isFooterEmpty = ElementUtil.checkEmptyContent(this);
3667
+ const isFooterEmpty = ElementUtil.checkEmptyRenderContent(this);
3668
3668
  if (this.element.disableClick && render.drawMode === 'view') {
3669
3669
  if (isFooterEmpty) {
3670
3670
  render.contentContext.setGlobalAlpha(0);
@@ -3741,7 +3741,7 @@ class DocumentHeaderRenderObject extends BlockContainerRenderObject {
3741
3741
  const { render, position } = e;
3742
3742
  render.tran(() => {
3743
3743
  //判断页眉是否为输入内容
3744
- const isHeaderEmpty = ElementUtil.checkEmptyContent(this);
3744
+ const isHeaderEmpty = ElementUtil.checkEmptyRenderContent(this);
3745
3745
  //存在输入内容时,绘制页眉-页体分割线
3746
3746
  if (!isHeaderEmpty || !this.element.disableClick) {
3747
3747
  const headerLineY = this.rect.height;
@@ -7443,7 +7443,7 @@ class ElementUtil {
7443
7443
  * 校验是否为空内容
7444
7444
  * @param ele
7445
7445
  */
7446
- static checkEmptyContent(ele) {
7446
+ static checkEmptyRenderContent(ele) {
7447
7447
  if (ele.length === 1) {
7448
7448
  const firstRender = ele.getChild(0);
7449
7449
  if (firstRender instanceof ParagraphRenderObject) {
@@ -17285,6 +17285,9 @@ class ElementTrackManage {
17285
17285
  //ele获取的为父容器
17286
17286
  if (index === parentIndex + 1) {
17287
17287
  if (ele instanceof BranchElement) {
17288
+ if (ele.type === 'tbc' && ele.getChildLength() === 2) {
17289
+ ele.clearItems();
17290
+ }
17288
17291
  ele.addChild(target, 0);
17289
17292
  return;
17290
17293
  }