我正在使用react-navigation,当我使用top-tab和stack时,会出现此边框。 enter image description here
如何删除此内容? 我的代码看起来像这样
const ShoutoutTopTab = createMaterialTopTabNavigator();
const ShoutoutTopTabScreen = () => {
return (<ShoutoutTopTab.Navigator
tabBarOptions={{
indicatorStyle: {backgroundColor:'#4A6159'},
tabStyle: {}
}} >
<ShoutoutTopTab.Screen name="GLOBAL" component={GlobalShoutout}/>
<ShoutoutTopTab.Screen name="COUNTRY" component={CountryShoutout}/>
</ShoutoutTopTab.Navigator>)
}
答案 0 :(得分:0)
尝试一下
tabBarOptions = {{
indicatorStyle: { backgroundColor: '#4A6159' },
tabStyle: {
borderBottomWidth: 0
}
}} >
答案 1 :(得分:0)
您可以这样做:
headerStyle: {
borderBottomWidth: 0,
}
答案 2 :(得分:0)
对于仍有问题的任何人,请尝试:
(在 material-top-tabs 5.3.14 中测试)
tabBarOptions = {{
style: {
shadowOpacity: 0
}
}}
答案 3 :(得分:0)
看起来像底部边框的东西实际上是一个阴影。
tabBarOptions = {{
style: {
shadowOpacity: 0,
elevation: 0,
}
}}
这适用于 IOS 和 Android。在 5.3.15 上测试。