react navigation三种导航,其中TabNavigation和StackNavigation用的比较多。今天要说的就是关于TabNavigation的样式问题,可能很多人都遇到过为什么明明设置了style和tabStyle还是会有问题。
我想可能会有很多人这样写:
const tabbaroption = {
activeTintColor: Color.f3474b,
inactiveTintColor: Color.C7b7b7b,
showIcon: true,
style: {
backgroundColor:'white'
},
indicatorStyle: {
opacity: 0
},
iconStyle:{
paddingTop:0,
padding:0,
marginTop:0,
width:SCALE(45),
height:SCALE(45),
},
labelStyle:{
marginTop:0,
padding:0,
},
tabStyle: {
height:Platform.OS==='ios'?SCALE(90):SCALE(100),
alignItems:'center',
justifyContent:'center',
}
};
//我发起的请假选项
const LeaveListIndex = TabNavigator(
{
LeaveUnCheckList: { screen: LeaveUnCheckList },
LeaveFinished:{screen: LeaveFinished}
},
{
lazy: true,
tabBarPosition: 'bottom',
a