如何在反应本机中隐藏特定的选项卡组件



在我的代码中,我想隐藏选项卡导航器中的抽屉选项卡。我会做很多尝试,但它不起作用。请帮助我。

const Drawer=createDrawerNavigator({
Home:{screen:Home},
})
const TabNavigator = createBottomTabNavigator({
Drawer:{screen:Drawer},
Home: {screen: Home},
Categories:{screen:Cate},
ShortList:{screen:ShortList},
Account:{screen:Account},
},
}
);

你不能。您可以改为将抽屉内的标签 pu,这样抽屉就会被隐藏,但在所有标签上都可用

const Drawer=createDrawerNavigator({
Tabs:{screen:TabNavigator, navigationOptions: {drawerLabel: () => null}}
Home:{screen:Home}
})
const TabNavigator = createBottomTabNavigator({
Home: {screen: Home},
Categories:{screen:Cate},
ShortList:{screen:ShortList},
Account:{screen:Account},
},
}
);

相关内容

  • 没有找到相关文章

最新更新