需要给swiper进行初始化

swiper1 = new Swiper('.swiper-container', {

 initialSlide :0,

 observer:true,//修改swiper自己或子元素时,自动初始化swiper

 observeParents:true//修改swiper的父元素时,自动初始化swiper

});

Created with the Personal Edition of HelpNDoc: Free EPub and documentation generator