vue中v-touch事件用法
2019-07-25 本文已影响137人
一只正在成长的程序猿
1.先下载
cnpm install vue-touch@next --save dev
2.在main.js引入
import VueTouch from 'vue-touch'
Vue.use(VueTouch, { name: 'v-touch' })
3.用法
<v-touch v-on:swipeup="goRegister">
<img src="../../assets/img/sign/login.png" alt="">
</v-touch>