Commit 5d8573fa authored by 潘永坪's avatar 潘永坪

组合票样式修改

parent c4e53868
...@@ -245,6 +245,7 @@ export default { ...@@ -245,6 +245,7 @@ export default {
}, },
//---下载方法 //---下载方法
downloadFun(imgUrl) { downloadFun(imgUrl) {
console.log(imgUrl)
uni.showLoading({ uni.showLoading({
title: '下载中', title: '下载中',
mask: true mask: true
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
</swiper-item> </swiper-item>
<swiper-item class="swiper-item"> <swiper-item class="swiper-item">
<u-waterfall v-model="albumList" style="padding-top: 8rpx;"> <u-waterfall v-model="albumList" class="waterfall" style="padding-top: 8rpx;">
<template v-slot:left="{leftList}"> <template v-slot:left="{leftList}">
<view v-for="(item, index) in leftList" :key="index" class="album-left" @click="goAlbum(index)"> <view v-for="(item, index) in leftList" :key="index" class="album-left" @click="goAlbum(index)">
<view class="album-list-top"> <view class="album-list-top">
...@@ -128,10 +128,10 @@ ...@@ -128,10 +128,10 @@
</swiper-item> </swiper-item>
<swiper-item class="swiper-item"> <swiper-item class="swiper-item">
<u-empty text="空空如也3..." mode="list"></u-empty> <u-empty text="空空如也..." mode="list"></u-empty>
</swiper-item> </swiper-item>
<swiper-item class="swiper-item"> <swiper-item class="swiper-item">
<u-empty text="空空如也4..." mode="list"></u-empty> <u-empty text="空空如也..." mode="list"></u-empty>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
...@@ -338,6 +338,12 @@ export default { ...@@ -338,6 +338,12 @@ export default {
//---导航栏切换 //---导航栏切换
tabbarChange(index) { tabbarChange(index) {
this.active = index this.active = index
if(index==0){
this.countSwiper()
}
if(index==1){
this.countSwiper('waterfall')
}
}, },
//---swiper滑动结束,分别设置tabs和swiper的状态 //---swiper滑动结束,分别设置tabs和swiper的状态
animationfinish(e) { animationfinish(e) {
...@@ -383,28 +389,26 @@ export default { ...@@ -383,28 +389,26 @@ export default {
this.$refs.detail.showPop = true this.$refs.detail.showPop = true
}, },
//计算第一个swiper高度 //计算第一个swiper高度
countSwiper1(){ countSwiper(label){
let labels=label||'checkbox-box'
this.$nextTick(() => { this.$nextTick(() => {
const query = uni.createSelectorQuery().in(this) const query = uni.createSelectorQuery().in(this)
query query.select(`.${labels}`).boundingClientRect(data => {
.select('.checkbox-box') this.swiperHeight=data.height
.boundingClientRect(data => { }).exec()
this.swiperHeight = data.height
})
.exec()
}) })
}, },
//---展示更多产品 //---展示更多产品
showMoreProduct(item) { showMoreProduct(item) {
item.productListCopy = item.productList item.productListCopy = item.productList
this.$forceUpdate() this.$forceUpdate()
this.countSwiper1() this.countSwiper()
}, },
//---收起产品 //---收起产品
retractProduct(item) { retractProduct(item) {
item.productListCopy = item.productList.slice(0, 2) item.productListCopy = item.productList.slice(0, 2)
this.$forceUpdate() this.$forceUpdate()
this.countSwiper1() this.countSwiper()
}, },
//---多选框变化 //---多选框变化
checkboxChange(e) { checkboxChange(e) {
...@@ -521,7 +525,7 @@ export default { ...@@ -521,7 +525,7 @@ export default {
}) })
}) })
this.$nextTick(() => { this.$nextTick(() => {
this.countSwiper1() this.countSwiper()
}) })
} else { } else {
uni.showToast({ uni.showToast({
...@@ -865,4 +869,7 @@ export default { ...@@ -865,4 +869,7 @@ export default {
.swiper-item /deep/ .u-waterfall{ .swiper-item /deep/ .u-waterfall{
padding-top:8rpx; padding-top:8rpx;
} }
.swiper-item /deep/ .u-empty{
height: 300px;
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment