
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;
}
}
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;
}
}