jerrybendy / vue-touch-events

Support simple touch events (tap / swipe / touch hold)
MIT License
537 stars 51 forks source link

Drag & Swipe to change page #87

Closed sts-ryan-holton closed 3 years ago

sts-ryan-holton commented 3 years ago

In many mobile apps a user is able to essentially "drag & swipe" to navigate to a different page, I've tried using the swipe directive in this package and it seems that I have to be very precise at dragging in an exact horizontal pattern, whereas in many apps I can simply drag from the side of the screen, even at a horizontal angle and have it change the page, but only as I'm dragging and letting go.

Is there a way to produce similar results with this library, if so, what's the closest example and settings to achieve this?

jerrybendy commented 3 years ago

The swipe event is only a simple implementation. In your case, you have to handle the events by yourself. If you use this library, you can try v-touch:start / v-touch:end / v-touch:moving (documents here).