收藏
回答

Editor组件setContents的调用在模拟器生效在真机上失效?

index.js

editorCtx.setContents({
  delta: [{
     attributes: {
        'data-custom': "{"id":"7236472931230024","name":"hdsfh"}",
        alt: "@hdsfh",
        class: "atPeople"
     },
     insert: { image: true }
  }]
})

index.less

.atPeople:after { 
  content: attr(alt);
  position: absolute;
  left:0;
  bottom:0;
  width:96%;
  color:red; 
}

index.wxml

<editor></editor>


在开发工具模拟器上会显示正常的内容:

在真机上显示不出来:

回答关注问题邀请回答
收藏

2 个回答

  • Demons
    Demons
    2023-11-22

    提供的代码片段无法复现,请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

    2023-11-22
    有用
    回复 8
    查看更多(3)
  • 来将通名
    来将通名
    2023-11-22

    希望能快点给个回复

    2023-11-22
    有用
    回复
登录 后发表内容