<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; // 富文本換行空格不顯示的問題