swiper6 的监听事件onSlideChangeEnd无效
VUE项目,"swiper": "^6.4.15",
import Swiper, { Pagination, Navigation } from 'swiper'
Swiper.use([Pagination, Navigation])
import 'swiper/swiper.min.css'
let mySwiper = new Swiper('.swiper-container', {
loop: true, observer: true,
onSlideChangeEnd: (swiper) => {
alert(swiper.activeIndex) //切换结束时,告诉我现在是第几个slide
},
})
onSlideChangeEnd无效
mySwiper的 对象属性上,也没有onSlideChangeEnd
求解
以上是 swiper6 的监听事件onSlideChangeEnd无效 的全部内容, 来源链接: utcz.com/p/935808.html