let arr = []
for (const v of r.data.data ){
// v.content = v.content.replace(/<img/g ,' <image mode="aspectFit"').replace(//>/g ,'></image>') //未生效
v.content = v.content.replace(/<img/g ,' <img width="100%"')
arr.push(v)
}
this.apiRes.PrewrittenArticle = arr
this.$apply()
<radio-group class=" weui-media-box__info radio-group">
<label class="radio" wx:for="{{apiRes.PrewrittenArticle}}">
<radio value="{{item}}" @tap="onTap" data-key="PrewrittenArticle" data-val="{{item.id}}" />{{item.title}}---{{item.description}}---
<rich-text nodes=" {{item.content}}"></rich-text>
</label>
</radio-group>
rich-text · 小程序 https://developers.weixin.qq.com/miniprogram/dev/component/rich-text.html