vue-awesome-swiper
vue-awesome-swiper copied to clipboard
How to destroy an active listener?
Hi all,
I created a listener as such
this.$refs.mySwiperMap.$swiper.on("slideNextTransitionEnd", () => {
and now I'm trying to destroy it. (to recreate a new one, so that it doesn't duplicate)
According to the documentation (https://swiperjs.com/api/), I can use mySwiper.detachEvents()
, but I have tried the following but doesn't work for me (many duplicates events firing on slide change)
-
this.$refs.mySwiperMap.$swiper.detachEvents()
-
this.$refs.mySwiperMap.detachEvents()
I am wondering how do I go about removing the swiper listener?
Dep ├── [email protected] ├── [email protected]
this.$refs.mySwiperMap.$swiper.off("slideNextTransitionEnd")