Skip to content
This repository has been archived by the owner. It is now read-only.

能不能做一个触发滑动的距离限制,就是滑动一定距离后才触发拉动效果,避免与其他滑动组件交叉滑动(上下左右) #51

Open
kinggerfeng opened this issue May 30, 2018 · 0 comments

Comments

@kinggerfeng
Copy link

比如我用了vux swiper ,向左右滑动的时候,很容易触发pull的上下滑动,这就很不美观了。我在
distanceStart: {
type: Number,
default: 0
},

handleTouchMove: function handleTouchMove(event) {
this.currentY = event.touches[0].clientY;
this.distance = (this.currentY - this.startY) / this.distanceIndex + this.beforeDiff;
//todo: 修改触发下拉距离 ,手机端app(ios)无效
if(this.distance<this.distanceStart)
return
加了一句判断,电脑端浏览器模拟手机有效,但是打包到ios app测试就出错了。本人js很菜,实在不知道怎么改了,只能求助了o(╥﹏╥)o

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant