使用此处https://github.com/dancormier/react-native-swipeout/blob/master/example/SwipeoutExample.js#L46
的建议示例代码启用TouchableWithoutFeedback
后,我将无法刷卡。
这是我的代码:
return (
<Swipeout
right={swipeoutBtns}
rowID={0}
sectionID={0}
autoClose={true}
backgroundColor="white"
onOpen={(sectionID, rowID) => {
this.setState({
sectionID,
rowID
});
}}
onClose={() => console.log("===close")}
scroll={event => console.log("scroll event")}
>
<TouchableWithoutFeedback onPress={() => console.log("press children")}>
<View style={{ height: 100 }}>
<Text style={styles.liText}>yo</Text>
</View>
</TouchableWithoutFeedback>
</Swipeout>
);
任何帮助将不胜感激。谢谢!
如果有帮助,请在此处提供我的信息
react-native info
info
React Native Environment Info:
System:
OS: macOS 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
Memory: 226.37 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.3 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
IDEs:
Android Studio: 3.4 AI-183.5429.30.34.5452501
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.4 => 0.59.4
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-cli: 2.0.1
答案 0 :(得分:0)
对于遇到此问题的任何人。如果Swipeout在抽屉式导航器内部,则必须禁用该导航上的手势。
在导航选项中添加drawerLockMode: "locked-open"