0

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

const Drawer=createDrawerNavigator({
Home:{screen:Home},

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

1 回答 1

0

你不能。您可以将选项卡放在抽屉内,这样抽屉将被隐藏但在所有选项卡上都可用

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},
},
}
);
于 2019-01-16T21:33:22.237 回答