Javascript 如何创建本地导航?
我有一个带有旋转木马屏幕(当我运行应用程序时)和地图屏幕的应用程序 在地图屏幕上,我有底部导航栏和两个选项卡:tab1和tab2。单击顶部导航栏上的tab1->I want option title='tab1'后。tab2也一样 这是根导航器:Javascript 如何创建本地导航?,javascript,reactjs,react-native,routes,react-navigation,Javascript,Reactjs,React Native,Routes,React Navigation,我有一个带有旋转木马屏幕(当我运行应用程序时)和地图屏幕的应用程序 在地图屏幕上,我有底部导航栏和两个选项卡:tab1和tab2。单击顶部导航栏上的tab1->I want option title='tab1'后。tab2也一样 这是根导航器: <Stack.Navigator screenOptions={{ headerStyle: { backgroundColor: '#C70066' } }}> <Stack.Screen name="Ca
<Stack.Navigator screenOptions={{ headerStyle: { backgroundColor: '#C70066' } }}>
<Stack.Screen name="Carousel" component={CarouselScreen} />
<Stack.Screen
name="Main"
component={TabNavigator}
/>
</Stack.Navigator>
这是:
<Tab.Navigator tabBar={TabBar} >
<Tab.Screen
name="Tab1"
component={Screen1}
options={{
tabBarAccessibilityLabel: "Tab1",
}}
/>
<Tab.Screen
name="Tab2"
component={Screen2}
options={{
tabBarAccessibilityLabel: "Tab2",
}}
/>
</Tab.Navigator>
应该是这样的:
我还需要样式堆栈。导航器和添加图标+下拉;我添加了唯一的背景色,如何设置其余部分的样式?您可以像这样在选项卡导航中添加样式和图标
(
表1
),
}}
/>