formatImg(html){
var newContent= html.replace(/<img[^>]*>/gi,function(match,capture){
var match = match.replace(/style=\"(.*)\"/gi, '');
return match;
});
return newContent;
},
res.data.data.article_content = this.formatImg(res.data.data.article_content);
res.data.data.article_content = res.data.data.article_content.replace(/\<img/gi, '<img style="max-width:100%;height:auto;')
富文本显示处理
最新推荐文章于 2024-09-03 10:25:11 发布