robinrodricks / vue3-touch-events

Simple touch events support for vue.js 3
MIT License
244 stars 31 forks source link

Event isn't triggering #4

Open vdomah opened 3 years ago

vdomah commented 3 years ago

Hello! Can't get it working. First tried vue2 branch with no success, now same with vue3.

When I specify function name as in docs, nothing happens:

v-touch:tap="buttonCallback"

and when I add (), function fires right after component is mounted:

v-touch:tap="buttonCallback()"

Please help

robinrodricks commented 3 years ago

This should work:

https://github.com/robinrodricks/vue3-touch-events#simple-callback

Miroba16 commented 11 months ago

Doesnt work for me either i have this in my template:

Swipe here Tap me

And this in my script:

methods: { handleSwipe(swipe) { console.log('Swipe Detected', swipe); }, handleTap(swipe) { console.log('Tap Detected', swipe); }, }

BUt is does not seem to be detecting any swipping neither the tapping