I'm using Vue 2.0 and I should work with swipe gestures. I have checked that there is one official plugin (named vue-touch) but as they say, Vue 2.0 is not supported yet.
Which libraries are available for Vue 2.0 to implement touch events?
I checked and there already is a vue-touch for Vue 2.0, it is on another branch though:
This branch is only compatible with Vue 1.0. For the Vue 2.0 compatible rewrite, see the next branch
https://github.com/vuejs/vue-touch/tree/next
You can easily use Hammer directly in Vue. Create Vue directives to wrap the Hammer touch events you're interested in. Do this once for your whole app. This is easy and shouldn't put you off.
Vue2-hammer (1600 weekly npm downloads) also wraps hammer but for the moment I'm choosing to do this directly. Vue2-touch-events (5000 weekly npm downloads) does not leverage Hammer, which seems brave.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With