vue-tap-smart
v1.0.4
Published
优化移动端点击事件
Downloads
8
Readme
vue-tap-smart
vue自定义指令v-tap,只支持vue2.0
使用方式
es6
import vueTap from 'vue-tap-smart';
Vue.use(vueTap);
require.js
require(['vue','vue-tap-smart'],function(Vue,vueTap){
vue.use(vueTap);
})
browser
//浏览器中直接引入
//<script src="vue.js"></script>
//<script src="vue-tap.js"></script>
相关参数
//调用方式:
v-tap="[tap,arg,arg2...]"
//获取参数:
methods:{
tap:function(arg,arg2...,event,el){
console.log(arg,arg2...);
}
}
//阻止冒泡:
v-tap.stop
//阻止默认动作:
v-tap.prevent
//自动添加后两位参数
event,el