我想问一下为什么底部标签没有显示在主屏幕上(隐藏) 这是我的代码
import React from 'react';
import {createAppContainer} from 'react-navigation';
import {createStackNavigator} from 'react-navigation-stack';
import Signup from './screens/signup';
import Login from './screens/login';
import Home from './screens/Home';
import Loading from './screens/Loading';
import Welcome from './screens/Welcome';
import ForgotPassword from './screens/ForgotPassword';
import ApplyLoan from './screens/ApplyLoan';
import Profile from './screens/Profile';
import LoanHistory from './screens/LoanHistory';
import { createMaterialBottomTabNavigator } from 'react-navigation-material-bottom-tabs';
export default class App extends React.Component {
render()
{
return (
<AppContainer>
<RootNavigator/>
<MainTab/>
</AppContainer>
);
}
}
const RootNavigator = createStackNavigator({
loading: {
screen: Loading,
navigationOptions: {
headerShown: false,
headerTransparent: true,
},
},
欢迎:{ 屏幕:欢迎, navigationOptions:{ headerShown:否, headerTransparent:是, }, }, 注册: { 屏幕:注册, navigationOptions:{ headerShown:否, headerTransparent:是, }, }, 登录: { 屏幕:登录, navigationOptions:{ headerShown:否, headerTransparent:是, }, }, 主页:{ 屏幕:首页, navigationOptions:{ headerShown:否, headerTransparent:是, }, }, 忘记密码: { 屏幕:忘记密码, navigationOptions:{ headerShown:否, headerTransparent:是, }, }, 申请贷款:{ 屏幕:ApplyLoan, navigationOptions:{ headerShown:否, headerTransparent:是, }, }, 贷款历史:{ 屏幕:LoanHistory, navigationOptions:{ headerShown:否, headerTransparent:是, }, }, 个人资料:{ 屏幕:个人资料, navigationOptions:{ headerShown:否, headerTransparent:是, }, }, InitialRouteName:正在加载 });
const MainTab = createMaterialBottomTabNavigator(
{
Home: { screen: Home,
navigationOptions:{
tabBarLabel:'Home',
tabBarIcon: ({ tintColor }) => (
<View>
<Icon style={[{color: tintColor}]} size={25} name={'ios-home'}/>
</View>),
}
},
Profile: { screen: Profile,
navigationOptions:{
tabBarLabel:'Profile',
tabBarIcon: ({ tintColor }) => (
<View>
<Icon style={[{color: tintColor}]} size={25} name={'ios-person'}/>
</View>),
activeColor: '#f60c0d',
inactiveColor: '#f65a22',
barStyle: { backgroundColor: '#f69b31' },
}
},
},
{
initialRouteName:“首页”,
activeColor:“#f0edf6”,
inactiveColor:'#226557',
barStyle:{backgroundColor:'#3BAD87'},
},
);
const AppContainer = createAppContainer(RootNavigator,MainTab);
我的代码有问题吗?