Kaynağa Gözat

轮播

tags/河北版C.8.1.01
caserKing 5 yıl önce
ebeveyn
işleme
d39455a237
2 değiştirilmiş dosya ile 9 ekleme ve 8 silme
  1. +2
    -2
      components/banner/index.wxml
  2. +7
    -6
      components/banner/index.wxss

+ 2
- 2
components/banner/index.wxml Dosyayı Görüntüle

@@ -5,8 +5,8 @@
<image data-id="{{item.id}}" data-data="{{item}}" mode='widthFix' bindtap='gotobannerdetail' src="{{item.coverImg}}" class="index-slide-image" /> <image data-id="{{item.id}}" data-data="{{item}}" mode='widthFix' bindtap='gotobannerdetail' src="{{item.coverImg}}" class="index-slide-image" />
</swiper-item> </swiper-item>
</block> </block>
</swiper> -->
<swiper class="imageContainer" bindchange="handleChange" previous-margin="70rpx" next-margin="70rpx" circular autoplay>
</swiper>autoplay -->
<swiper class="imageContainer" bindchange="handleChange" previous-margin="39rpx" next-margin="40rpx" circular>
<block wx:for="{{list}}" wx:key="{{index}}"> <block wx:for="{{list}}" wx:key="{{index}}">
<swiper-item class="item"> <swiper-item class="item">
<image class="itemImg {{currentIndex == index ? 'active': ''}}" src="{{item.coverImg}}"></image> <image class="itemImg {{currentIndex == index ? 'active': ''}}" src="{{item.coverImg}}"></image>


+ 7
- 6
components/banner/index.wxss Dosyayı Görüntüle

@@ -56,24 +56,25 @@
} }
.itemImg{ .itemImg{
position: absolute; position: absolute;
width: 670rpx;
height: 238rpx;
width: 640rpx;
height: 248rpx;
border-radius: 15rpx; border-radius: 15rpx;
overflow: hidden; overflow: hidden;
z-index: 5; z-index: 5;
opacity: 0.7; opacity: 0.7;
top: 15%; top: 15%;
margin: 0 20rpx;
} }
.active{ .active{
opacity: 1; opacity: 1;
z-index: 10; z-index: 10;
width: 670rpx;
height: 304rpx;
top: 7%;
width: 640rpx;
height: 270rpx;
top: 11%;
transition:all .2s ease-in 0s; transition:all .2s ease-in 0s;
} }
.item{ .item{
width: 670rpx!important;
width: 100%;
height: 304rpx; height: 304rpx;
overflow: hidden; overflow: hidden;
border-radius: 16rpx; border-radius: 16rpx;

Yükleniyor…
İptal
Kaydet