VaJoy / vue-swipe

a lightweight slide directive for vue.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vue-swipe

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

Usage

1. import the directive:

import vueSwipe from 'src/directives/vue-swipe'
vueSwipe.use();

2. work on the template:

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>

About

a lightweight slide directive for vue.js


Languages

Language:JavaScript 100.0%