swiper的监测是第几页的回调函数

可以检测到滑动到的下一页的索引值 官方的API接口,还有很多的回调函数可以监测当前页面索引值。

var swiper = new Swiper('.swiper-container', {
  on:{
    slideChangeTransitionEnd: function () {
        console.log(this.realIndex);
    }
  },
});

猜你喜欢

转载自blog.csdn.net/weixin_45773503/article/details/106453965