Closed sarahxoxo closed 5 years ago
Hi @sarahxoxo,
The fact that vue-glide provides only those events that are in the glide.js that are prefixed with glide:
. Glide.js not provide index of active slide.
Currently, vue-glide has a custom event glide: slide-click
which returns the index of the slide on which the click was made. This part is a further development in which I plan to add slide switching by click.
Hi @antonreshetov , Got it. Thanks for your reply.
@antonreshetov
This part is a further development in which I plan to add slide switching by click.
Is there a way to do this currently with the slider. ?
My solution if it helps someone, using the slide-click
Slider Initialisation:
<vue-glide ref="slider" @glide:slide-click="moveSlide">
Methods:
moveSlide(index) { this.$refs.slider.glide.go(
=${index}) }
@antonreshetov
This part is a further development in which I plan to add slide switching by click.
Is there a way to do this currently with the slider. ?
<vue-glide ref="slider" @glide:swipe-end="setDataProducts"> Methods: setDataProducts(){ this.$refs.slider.glide.index }
Hi, I've read the documents, and still don't know how to use events. Could you give an example about how to listen on the index of current active slide?