反应导航抽屉打开问题

时间:2018-10-08 11:09:15

标签: react-native navigation-drawer react-navigation drawer

我已经尝试过

this.props.navigation.dispatch(DrawerActions.openDrawer());

this.props.navigation.navigate("toggleDrawer");

this.props.navigation.navigate("DrawerOpen");

但仍然无法通过单击按钮从左向右滑动来打开抽屉。

enter image description here

enter image description here

在点击事件中,我尝试了这些选项。

enter image description here

2 个答案:

答案 0 :(得分:0)

尝试将其添加到您的navigationOptions

drawerLockMode: 'unlocked'

答案 1 :(得分:-1)

应该是

this.props.navigation.openDrawer()
相关问题