UNI-APP rich-text解析富文本数据,图片不能自适应
一、解决方案
<rich-text :nodes="goodsInfor.content"></rich-text>
数据替换下
res.data.content = res.data.content.replace(/<img/gi, "<img class='richImg'");
css
.richImg { width: 100% !important; height: auto !important; }
浩楠哥