Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

部分手机点击内部元素时会触发成pulling事件,建议添加一个距离判断来 #55

Open
seventeen-eleven opened this issue May 30, 2022 · 0 comments

Comments

@seventeen-eleven
Copy link

image
onShouldSetPanResponder(e, gesture) {
if (!this.pullable || !isVerticalGesture(gesture.dx, gesture.dy)) { //不使用pullable,或非向上 或向下手势不响应
return false;
}
// if (this.props.onPulling || this.props.onPullOk || this.props.onPullRelease) {
// return !this.state.scrollEnabled;
// }
if(gesture.dy < 10){
return false
}
if (!this.state.scrollEnabled) {
this.lastY = this.state.pullPan.y._value;
return true;
} else {
return false;
}
}

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

No branches or pull requests

1 participant