This commit is contained in:
Gdpao
2020-08-04 21:46:52 +08:00
parent 43845b4810
commit 692495f108
10 changed files with 49 additions and 21 deletions

View File

@@ -4,7 +4,7 @@
<view>
<u-tabs-swiper ref="uTabs" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="60" ></u-tabs-swiper>
</view>
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" :style="{height: swiperHeight}">
<swiper class="swiper-box" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" :style="{height: swiperHeight}">
<swiper-item class="swiper-item" v-for="(_, index) in classifyList" :key="index">
<view class="goods-item">
<item v-for="item in goodsList" :key="item.goods_id" :info="item"></item>
@@ -128,11 +128,20 @@ export default {
text-align: center;
color: #333;
}
.goods-item {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-top: 20rpx;
}
.swiper-box {
height: 100%;
margin-bottom: 10rpx;
.swiper-item {
height: 100%;
.goods-item {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
width: 100%;
height: 100%;
overflow-y: scroll;
}
}
}
}
</style>

View File

@@ -44,6 +44,7 @@ export default {
<style lang="scss" scoped>
.item{
width: 330rpx;
height: 500rpx;
margin-bottom: 26rpx;
background-color: #f8f8f8;
border-radius: 10rpx 10rpx 0rpx 0rpx;

View File

@@ -78,7 +78,7 @@ export default {
num = this.couponList.length
? this.couponList.length > 4 ? 4 : this.couponList.length
: 1
this.swiperHeight = (97 + 10) * num + 'px';
this.swiperHeight = (200 + 20) * num + 'rpx';
},
toCouponPage() {
this.$u.route({
@@ -116,6 +116,7 @@ export default {
box-sizing: border-box;
background-color: #ffffff;
.coupon-item {
height: 200rpx;
margin-bottom: 20rpx;
}
}