- You can install it via npm:
npm install vfinger
-
This is a hammerjs based on the gesture library,You can easily support a variety of touch events and gestures in your project.
-
By using vfinger you can listen to the gestures of the element gesture operation.
- Using Components
import vfinger from 'vfinger';
Vue.use(vfinger);
- Direct import
<script src="//cdn.bootcss.com/vue/2.2.4/vue.js"></script>
<script src="./v-finger.js"></script>
- Using the v-finger directive
<div id="demo" v-finger="{methods:callback,a:123,b:3333}">
- add callback method
methods: {
callback: function (type,e,params) {
console.log(type)
console.log(params)
console.log(e)
}
}
In use there are any questions, please give me feedback, you can use the following contact with me
Mail (luandapipi@gmail.com)
Thanks for the following items, ranked in no particular order
- MIT