富文本img标签添加类名

This commit is contained in:
jqtmviyu@gmail.com 2021-02-27 17:28:59 +08:00
parent af176ea03e
commit 2ba43a28d2

View File

@ -53,7 +53,8 @@ export default {
this.pics = pics
this.goods_name = goods_name
this.goods_price = goods_price
this.goods_introduce = goods_introduce
// img
this.goods_introduce = goods_introduce.replace(/<img/g, '<img class="img"')
},
showBigImgHandle(current){
const urls = this.pics.map(item => item.pics_big)
@ -118,4 +119,17 @@ export default {
height: 100%;
}
}
</style> </style>
.detail_title {
height: 80rpx;
display: flex;
font-size: 26rpx;
justify-content: center;
align-items: center;
}
// HTML
.img {
/* 覆盖默认基线对齐造成的图片底部缝隙影响 */
vertical-align: top;
}
</style>