微信小程序rich-text 内图片显示不完整
<rich-text wx:elif="{{ type === 'html' }}" nodes="{{ message }}"></rich-text>
微信小程序 使用 字段 图片显示不完整解决
<rich-text nodes="{{ nodes}}"></rich-text>
// js 部分
if (TaskListPC.finishTL == 1) {
let nodes = TaskListPC.finish_hint.replace(/\<img/gi, '<img style="width:100%;height:auto;display:block;margin: 0 auto; "')
// 打开文本
that.setData({
nodes: nodes
})
// 渲染内容
}