琳琅酒
琳琅酒
  • 发布:2018-12-02 15:28
  • 更新:2018-12-02 15:28
  • 阅读:891

请问富文本选择nodes模式后text如何选择控制台中的值

分类:uni-app

就是下面的
success: res => {
console.log(res);
this.text=res.data.content;}
中的
this.text这里写什么?

我试过
this.nodes.children.text=res.data.content;
this.div.children.text=res.data.content;
this.div.text=res.data.content;
this.text
this.div
都不行

完整的代码如下:

模板中的
<rich-text :nodes="nodes"></rich-text>

数据中的:
data() {
return {
nodes: [{
name: 'div',
attrs: {
class: 'div_class',
style: 'line-height: 60px; color: red; text-align:center;'
},
children: [{
type: 'text',
text: ''
}]
}],
}
},
onLoad: function(e){
console.log(e);
uni.request({
url: *****,
method:'GET',
success: res => {
console.log(res);
this.title=res.data.title;
this.text=res.data.content;

                }
2018-12-02 15:28 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复