I am wondering how do we make swiper to trigger function when i swipe it left or right in Vue
I am trying to make function call when i swipe slide left or right
I know we can pass some additional parameters like
Thank you for your tips,
I actually tried it and it worked.
but the problem is I need to change the value of this.something.
I mean i was able to do some alert or consloe.log and it all worked but somehow it could not access
the value of this.something.
Save your instance in a var before calling inside the swiper on function
methods: {
getSwiperInstance () {
let vm = this
this.mySwiperInstance = this.$f7.swiper.get(’.swiper-container’)
this.mySwiperInstance.on(‘slideNextTransitionStart’,function() {
console.log(vm.month)
});
}
}