From 86686ef1a62f091a02b97e9fd8071b94b0288987 Mon Sep 17 00:00:00 2001 From: ghusermoon <2673031505@qq.com> Date: Mon, 20 Jul 2020 17:28:37 +0800 Subject: [PATCH] update coupon height --- components/shop/youhq/index.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/shop/youhq/index.vue b/components/shop/youhq/index.vue index 113cf30..f6641d4 100644 --- a/components/shop/youhq/index.vue +++ b/components/shop/youhq/index.vue @@ -74,7 +74,10 @@ export default { }, setViewHeight() { // 一个优惠券的高度 97px, 下距离 10px - const num = this.couponList.length; + let num = 0; + num = this.couponList.length + ? this.couponList.length > 4 ? 4 : this.couponList.length + : 1 this.swiperHeight = (97 + 10) * num - 10 + 'px'; }, toCouponPage() {