修改banner的过渡时间
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
:style="'background-color:'+itemData.style.background+';'"> -->
|
||||
<view class="diy-banner-box mb20 pr" :class="itemData.style.imgShape">
|
||||
<swiper class="swiper" :autoplay="autoplay" :interval="interval" :duration="duration" @change="changeSwiper" :style="itemData.style.imgShape=='square'?'height:'+itemData.style.height+'rpx;':'height:'+(itemData.style.height*0.92)+'rpx;'">
|
||||
<swiper-item v-for="(item,index) in itemData.data" :key="index" @click="gotoPages(item)">
|
||||
<swiper-item v-for="(item,index) in itemData.data" :key="index" @click="previewBannerImage(index)">
|
||||
<image :style="itemData.style.imgShape=='square'?'height:'+itemData.style.height+'rpx;':'height:'+(itemData.style.height*0.92)+'rpx;'" :src="item.imgUrl"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
@ -21,7 +21,7 @@
|
||||
return {
|
||||
indicatorDots: true,
|
||||
autoplay: true,
|
||||
interval: 2000,
|
||||
interval: 4000,
|
||||
duration: 500,
|
||||
indicatorActiveColor: '#ffffff',
|
||||
current: 0
|
||||
@ -37,6 +37,13 @@
|
||||
changeSwiper(e) {
|
||||
this.current = e.detail.current;
|
||||
},
|
||||
// 预览轮播图图片
|
||||
previewBannerImage(index) {
|
||||
// 获取所有图片url
|
||||
const urls = this.itemData.data.map(item => item.imgUrl);
|
||||
// 调用全局yulan方法
|
||||
this.yulan(urls, index);
|
||||
},
|
||||
/*跳转页面*/
|
||||
gotoPages(e) {
|
||||
this.gotoPage(e.linkUrl);
|
||||
|
||||
Reference in New Issue
Block a user