swiper 下拉刷新混乱

在下来刷新时,banner轮播图播放混乱:

添加判断

if(this.mySwiper.activeIndex){ this.mySwiper.destroy(true,false);//这句是关键,销毁有swiper上的事件,但是保存样式 } setTimeout(function(){ mySwiper = new Swiper('.swiper-container',{ loop: length>1 ?true:false, sapceBetween:30, centerdSlides:true, runCallbacksOnInit:true, on:{ }, autoplay:{ delay:2000, disableOnInteraction:false }, pagination:{ el:'.swiper-pagination', callback:true } }) },200)

posted @ 2018-02-26 17:00  hubgit  阅读(596)  评论(0编辑  收藏  举报