You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
会报错:
null is not an object (evaluating 'event.nativeEvent.pageX)
因为
onLongPress={this.speedLongTouch}
onPressOut={this.speedLongTouchOut}
var speedStartX = evt.nativeEvent.pageX
中的nativeEvent不存在。
"react-native": "0.63.2",
中
会报错:
null is not an object (evaluating 'event.nativeEvent.pageX)
因为
onLongPress={this.speedLongTouch}
onPressOut={this.speedLongTouchOut}
var speedStartX = evt.nativeEvent.pageX
中的nativeEvent不存在。
官方文档:
https://reactnative.dev/docs/pressevent
example:
{
changedTouches: [PressEvent],
identifier: 1,
locationX: 8,
locationY: 4.5,
pageX: 24,
pageY: 49.5,
target: 1127,
timestamp: 85131876.58868201,
touches: []
}
不需要nativeEvent吧。直接pageX就行。我理解没错吧
The text was updated successfully, but these errors were encountered: