<rich-text nodes='{{text}}'></rich-text>
// pages/my_chat/component/message/client/clienttext/clienttext.js
Component({
properties: {
contai: {
type:String
}
},
data: {
text: ""
},
ready: function () {
this.setData({
text: this.properties.contai.replace(/(<img[\s\S]+?)/ig, '<img style="width:23px;margin:0 auto;"'),
})
},
methods: {
}
})
网友评论