vue2.0移动端滑动事件vue-touch

来源:互联网 发布:象过河软件免费版 编辑:程序博客网 时间:2024/06/01 22:13

https://github.com/vuejs/vue-touch/tree/next

cnpm install vue-touch@next
var VueTouch = require('vue-touch')Vue.use(VueTouch, {name: 'v-touch'})
//左划      默认渲染为div   data为参数<v-touch v-on:swipeleft="onSwipeLeft(data)">Swipe me!</v-touch>//点击   渲染为一个a标签<v-touch tag="a" v-on:tap="onTap">Tap me!</v-touch>//点击   渲染为p标签<v-touch tag="p" v-on:tap="onTap">Tap me!</v-touch>
原创粉丝点击