最佳答案
我知道这个问题很老,但由于没有答案,我正在为此提供解决方案。
react-native-modal
的最新版本提供了一个 Prop propagateSwipe
允许滑动事件传播到您的情况下的子组件 ScrollView
<Modal propagateSwipe={true}>
<ScrollView>
// .... other components
</ScrollView>
<Modal>
但目前在 v11.3.1
中,当您提供 swipeDirection
属性时,它会出现一个小问题,并且它不起作用。
解决此问题的方法是在 ScrollView
中添加 TouchableOpacity
组件
<Modal>
<ScrollView>
<TouchableOpacity> ... </TouchableOpacity>
</ScrollView>
<Modal>
您可以阅读更多 here关于这个问题。
关于javascript - 带有嵌套 ScrollView 的可滑动 React-native-modal,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48466314/