VUE后台获取的富文本进行编辑
在VUE中富文本直接显示是V-html
但是如果富文本编辑过来的全都是图片那么富文本编辑出来的内容就全部是img内容
如果需要在img中设置点击放大就需要属性截断动态添加属性
this.contentInfo = '<img src="295ae67eca0c88e9529075e45295da.png" alt="undefined">'
if (this.contentInfo.replace('<img')) {
console.log(111)
console.log(this.contentInfo.replace('<img'))
this.$set(this.contentInfo, '<img v-gallery')
}
我需要在图片中添加一个v-fallery的属性让图片放大。但是这样的动态修改方法好像不行。
所以发帖找个人帮忙下=。=