uniapp 移动端渲染富文本时图片超宽解决方法

使用replace替换富文本中的图片属性

let reg = new RegExp('<img','gi');
this.info = this.info.replace(reg,'<img style="max-width:100%;vertical-align: top;"');

 

posted @ 2023-01-14 16:01  墨缘灬  阅读(521)  评论(0)    收藏  举报