Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/439.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何创建本地导航?_Javascript_Reactjs_React Native_Routes_React Navigation - Fatal编程技术网

Javascript 如何创建本地导航?

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

我有一个带有旋转木马屏幕(当我运行应用程序时)和地图屏幕的应用程序 在地图屏幕上,我有底部导航栏和两个选项卡:tab1和tab2。单击顶部导航栏上的tab1->I want option title='tab1'后。tab2也一样

这是根导航器:

  <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
),
}}
/>