@mu-ui/mu-touch
v0.1.0
Published
touch vue component for vue 2.x
Downloads
3
Readme
mu-touch 滑动手势
安装方式
yarn add @mu-ui/mu-touch使用指南
import Touch from '@mu-ui/mu-touch'
Vue.component('Touch', Touch)
<Touch @result="result">
...
</Touch>
...
methods: {
result(res) {
console.log(res) // top|bottom|left|right
}
}mu-touch Props
参数|说明|类型|默认值 ---|---|---|--- threshold|滑动生效的最小距离|Number|50 restraint|滑动时另一个方向的最大距离|Number|80
mu-touch Events
名称|说明 ---|--- result|返回触发方向的结果
