<view v-if="bannerList.length" class="swiper-wrap"> <swiper class="swiper" :circular="circular" :indicator-dots="indicator" autoplay="true" interval="2000" duration="500"> <block v-for="(itme,index) in bannerList" :key="itme.id"> <swiper-item > <image @click="toWebviewHandle(index)" style=" 100%;height: 252rpx;" :src="itme.imageUrl" mode="aspectFill"></image> </swiper-item> </block> </swiper> </view>
data() { return { bannerList:[], interval: 2000, duration: 500, circular: true, indicator: false } }
.swiper-wrap { margin-left: 24rpx; margin-top: 24rpx; height: 252rpx; 702rpx; border-radius: 12rpx !important; overflow: hidden !important; transform: translateY(0); .swiper, .uni-swiper-wrapper { border-radius: 12rpx !important; overflow: hidden !important; transform: translateY(0); //关键代码 image{ border-radius: 12rpx; } } }