1***@qq.com
1***@qq.com
  • 发布:2023-03-06 11:00
  • 更新:2023-03-06 16:31
  • 阅读:113

富文本小程序上无法获取实例,h5和app上正常

分类:uni-app

WAServiceMainContext.js?t=wechat&s=1678064930011&v=2.30.2:1 TypeError: Cannot read property 'setContents' of null

uni.createSelectorQuery().select('#editor').context((res) => {  
						this.editorCtx = res && res.context  
						console.log(res, '=====', this.editorDetail)  
						this.editorCtx.setContents({  
							html: this.editorDetail //this.editorDetail为赋值内容。      
						})  
						uni.hideLoading()  
					}).exec()
2023-03-06 11:00 负责人:无 分享
已邀请:
YUANRJ

YUANRJ

哪个小程序,HBuilderX版本多少,注意要在富文本初始化后再获取实例。

要回复问题请先登录注册