我是反应原生的新手。我有一个名为“联系人”的选项卡,我想在用户单击它时打开抽屉。当我单击“联系人”选项卡时,下面的代码会打开抽屉屏幕。但我想打开导航抽屉。
非常感谢您提前...
const Tabs = createMaterialBottomTabNavigator();
export default function bottomTab(){
return(
<NavigationContainer>
<Tabs.Navigator tabBarOptions={{activeTintColor:'#4267B2'}} >
<Tabs.Screen name="Home" component={Home} />
<Tabs.Screen name= "Contacts" component={DrawerNavigation}/>
</Tabs.Navigator>
</NavigationContainer>
)
}
const Drawer = createDrawerNavigator();
const DrawerNavigation = () => {
return(
<Drawer.Navigator>
<Drawer.Screen name="Setting" component={Setting}/>
<Drawer.Screen name="Notification" component={Notification}/>
</Drawer.Navigator>
)
}