老师,在切换tab时,header部分如何动态的跟着变化
const BottomNavigator = createBottomTabNavigator({
Login:{
screen: Login,
navigationOptions: {
title: '登录',
tabBarLabel: '登录',
}
},
User:{
screen: User,
navigationOptions: {
title: '用户',
tabBarLabel: '用户',
}
},
Index:{
screen: Index,
navigationOptions: {
title: '首页',
tabBarLabel: '首页',
}
},
List:{screen: List},
});
export const stackNavigator = createStackNavigator({
BottomNavigator:{
screen: BottomNavigator,
navigationOptions: {
header: null,
}
},
Detail:{screen: Detail},
Brew: {screen: Brew},
Test: {screen: Test},
})
这个时候header部分是不显示的,