1.0.2 • Published 2 years ago
v-motion v1.0.2
v-motion
Vue 轻量级手势方向指令。
安装
使用 npm 安装:
npm i v-motion --save
import Vue from 'vue'
import motion from 'v-motion'
Vue.use(motion)
使用
<template>
<div class="motion" v-motion="motion"></div>
</template>
new Vue({
methods: {
motion: function (e) {
if(e==='Swipe-right'){
console.log('右划')
}
if(e==='Swipe-left'){
console.log('左划');
}
}
}
})