修改商品详情中图片有空格问题

master
lemon橪 2021-11-19 15:49:42 +08:00
parent 98c5863973
commit 89dbd32351
1 changed files with 24 additions and 15 deletions

View File

@ -8,7 +8,8 @@
</div>
</div>
<u-empty class="empty" text="暂无商品介绍" mode="data" v-if="!res.mobileIntro"></u-empty>
<u-parse class="vhtml" :lazy-load="true" :use-cache="true" :show-with-animation="true" :html="res.mobileIntro"></u-parse>
<u-parse class="vhtml" :lazy-load="true" :use-cache="true" :show-with-animation="true"
:html="res.mobileIntro"></u-parse>
</view>
</view>
</view>
@ -43,16 +44,15 @@ import { getGoodsMessage } from "@/api/goods";
export default {
data() {
return {
goodsDetail: ""
goodsDetail: "",
};
},
props: ["res", "goodsId", "goodsParams"],
async mounted() {
console.log(this.res)
console.log(this.res);
let res = await getGoodsMessage(this.goodsId);
if (res.data.success) {
this.goodsDetail = res.data.result;
}
},
};
@ -103,6 +103,11 @@ export default {
width: 100%;
}
.vhtml {
/deep/ img {
display: block !important;
}
}
/deep/ img {
width: 100%;
@ -126,7 +131,11 @@ export default {
width: 52rpx;
height: 6rpx;
background-image: linear-gradient(90deg, $price-color, $price-light-color);
background-image: linear-gradient(
90deg,
$price-color,
$price-light-color
);
}
}
> .goods-detail-item {