this.msg = this.msg.replace(/</g, "<")
.replace(/>/g, ">")
.replace(/&/g, "&")
.replace(/"/g, '"')
.replace(/'/g, "'");
可能是传回的html标签被转义了,把他转回来,就可以解析了
this.msg = this.msg.replace(/</g, "<")
.replace(/>/g, ">")
.replace(/&/g, "&")
.replace(/"/g, '"')
.replace(/'/g, "'");
可能是传回的html标签被转义了,把他转回来,就可以解析了
本文标题:v-html无法解析后台传回的html标签
本文链接:https://www.haomeiwen.com/subject/neungktx.html
网友评论