const navigationOptions = ({navigation}) => ({
//其他配置项略
drawerLockMode:'locked-closed' //here
});
const MainStackNavigator = StackNavigator({
Chat:{
screen: Chat,
navigationOptions:{ //这步配置建议在Chat组件里使用static navigationOptions配置
drawerLockMode:'unlocked', //here
}
}
//其他界面配置略
},{
navigationOptions: navigationOptions,
initialRouteName: 'Chat', //首页
});
解决react native react-navigation DrawerNavigator 在其他界面侧滑手势会唤出侧滑菜单问题
最新推荐文章于 2021-11-02 10:42:39 发布