Handle left or right keypress
haloboy777 opened this issue · 1 comments
haloboy777 commented
There should be a way to call next and prev functions to handle keypress pragmatically.
Rozkalns commented
Or it would be great if there would be exposed methods to trigger the next() or prev(), so we could implement this not only with the key press functionality, but also with hammer js swipes or something else.
Edit:
Actually, you can do this already.
In template:
<slider ref="slider">[...]</slider>
<button @click="next" v-hammer:swipe.right="next"></button>
In script:
methods: {
next () {
this.$refs.slider.next()
}
}