editor组件的在js赋值后会自动聚焦,导致手机弹窗出虚拟键盘出来,怎么才能赋值不触发聚�
for (let i = datas.length - 1; i >= 0; i–) {
let idone = “.editor” + i
wx.createSelectorQuery().select(idone).context(function(res) {
let editorCtx = res.context
editorCtx.setContents({
html: _this.data.objectArr[i].html,
success: function() {
console.log(‘insert html success’)
}
})
}).exec()
}
<editor style=“width: 600rpx;” class=“editor {{‘editor’ + index}}” placeholder-style=“color: red;” placeholder=‘点击添加文字’ maxlength="-1" value=’{{item.text}}’ data-index=’{{index}}’ bindinput=‘textObject’></editor>