Commit d7247042 by 李嘉林

商品列表组件-轮播高度

parent 47ffe377
...@@ -69,7 +69,13 @@ const componentOptions = { ...@@ -69,7 +69,13 @@ const componentOptions = {
selectScreen: false, // 筛选选中状态 selectScreen: false, // 筛选选中状态
clientHeight: 0, //窗口高度 clientHeight: 0, //窗口高度
swipeInfo: [], swipeInfo: [],
currentSwiperIndex: 0 currentSwiperIndex: 0,
swiperTypeHeightList: {
1: "510px",
2: "300px",
3: "256px",
4: "220px",
}
}, },
// 数据监听器 // 数据监听器
observers: {}, observers: {},
......
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
</view> </view>
<!-- 轮播滑动 --> <!-- 轮播滑动 -->
<view wx:if="{{datas.componentData.style === 'swipe'}}" style="position:relative;"> <view wx:if="{{datas.componentData.style === 'swipe'}}" style="position:relative;">
<swiper bindchange="handleSwipeChange"> <swiper bindchange="handleSwipeChange" style="height: {{swiperTypeHeightList[datas.componentData.columnNum]}}">
<block wx:for="{{swipeInfo}}"> <block wx:for="{{swipeInfo}}">
<swiper-item> <swiper-item>
<view style="display: grid;gap:{{datas.componentData.proGap*2}}rpx;grid-template-columns:repeat({{datas.componentData.columnNum}}, 1fr)"> <view style="display: grid;gap:{{datas.componentData.proGap*2}}rpx;grid-template-columns:repeat({{datas.componentData.columnNum}}, 1fr)">
......
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