<rich-text :nodes="graphicDetails"></rich-text>
获取到后台返回的字符串后将大于号小于号替换回来,将图片的宽度设置为100%
// 富文本部分反解析
UnchangeContent(str) {
return str ? str.replace(/</g, '<').replace(/>/g, '>').replace(/quot;/g, '"').replace(/<img/g, '<img style="max-width: 100%;"') : ''
}
white-space: pre-wrap; // 富文本换行空格不显示的问题