簡體   English   中英

React-Native Swipeout無法滑動

[英]React-Native Swipeout unable to swipe

使用此處的建議示例代碼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

對於遇到此問題的任何人。 如果Swipeout位於抽屜導航器內,則必須禁用該導航上的手勢。

在導航選項內添加drawerLockMode: "locked-open"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM