Pass parameters to v-touch event handlers
masterTo pass custom parameters to a v-touch handler, the handler method must return a delegate function. The delegate function receives the event direction (for swipes) and the mouseEvent object.
<div v-for="(item, i) in items">
<div v-touch:swipe="onSwipeItem(item, i)">Button</div
</divmethods: {
onSwipeItem(item, i) {
return function (direction, mouseEvent) {
console.log("Swiped item ", i, ": ", item, " in direction ", direction);
};
},
}