vue中v-touch事件用法

1.先下载

1
cnpm install vue-touch@next --save dev

2.在main.js引入

1
2
import VueTouch from 'vue-touch'
Vue.use(VueTouch, { name: 'v-touch' })

3.用法

1
2
3
<v-touch v-on:swipeup="goRegister">
<img src="../../assets/img/sign/login.png" alt="">
</v-touch>