Open sts-ryan-holton opened 2 years ago
The parameter of v-touch
must be a function. So that your peek
method should return a function, not a Promise.
I'm having a similar issue. v-thouch:tap is actually firing on hover even though it's calling a plain function.
@adamxi Could you paste your code here?
I've got this library integrated into my Nuxt JS project. I'd like to create a "peek" function that, when a user long-presses a button then some functionality is triggered. I've created a function called
peek
and have attached it onto 3 buttons, passing some text through each function.My buttons aren't initially shown, they're inside a
v-if
as part of a "FAB" that I've created.When I open the FAB using the main button, my
peek
function is running 3 times, when it shouldn't be running at all, and is then running 6 times when I tap on a button that has the function, this should be running once.What am I missing, my structure for my HTML is:
My function is: