robinrodricks / vue3-touch-events

Simple touch events support for vue.js 3
MIT License
216 stars 27 forks source link

Is there a way to set the direction of the touch drag event? #13

Open schosdas opened 2 years ago

schosdas commented 2 years ago

Hello I'm making a carousel that displays a blog list. Currently, the problem with this is that the carousel moves along with the touch drag (scroll) while pressing the carousel component.

I found a way to block the touch slide through the Carousel's plug-in, and I'm going to use it when a scroll event is called. I think I can't use scroll events and wheel events on mobile and I have to use touch move events. So can I call the touch drag event only when I move it up/down (touch scroll)?

For example, can I use it like 'v-touch:drag.up' or 'v-touch:drag.down'?

Thank you.

liuhongjian0316 commented 2 years ago

+1