a lightweight swipe directive for vue.js
NOTICE - this directive has NO realtime feedback, use it in the case of doing sth after swiping. e.g., switch page tab after the (left-to-right/right-to-left)swipe gesture operating
import vueSwipe from 'src/directives/vue-swipe'
vueSwipe.use();
with callback name directly:
<div class="cards" v-swipe="onSwipe">
<!--some other DOM -->
</div>
OR with options:
<div class="cards" v-swipe="{fn:onSwipe, slipMinTime:5000}">
<!--some other DOM -->
</div>