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'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
vue2-touch-events
made an important release 9 days ago and it is currently the most popular package to manage touch events in Vue: npmjs.com/package/vue2-touch-events –
Considering 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.
© 2022 - 2024 — McMap. All rights reserved.