native-base - 本机基础标签 - 知道如何删除标签周围的边框吗?
问题描述
以下屏幕截图是下面提供的代码的结果。知道如何删除标签周围的边框吗?
import React from 'react';
import { SafeAreaView } from 'react-native';
import { Container, Header, Title, Text, Tabs, Tab } from 'native-base';
export default class Settings extends React.Component {
static navigationOptions = {
header: null
};
render() {
return (
<SafeAreaView style={{ flex: 1 }}>
<Container
style={{ flex: 1, backgroundColor: '#fff', marginTop: 30 }}>
<Header hasTabs transparent>
<Title style={{ color: 'grey' }}>
Settings
</Title>
</Header>
<Tabs tabBarUnderlineStyle={{ backgroundColor: 'blue', height: 1 }}>
<Tab heading="Tab1"
tabStyle={{ backgroundColor: 'white' }}
textStyle={{ color: 'grey' }}
activeTabStyle={{ backgroundColor: 'white' }}
activeTextStyle={{ color: 'blue' }}>
<Text>TODO: Tab1</Text>
</Tab>
<Tab heading="Tab2"
tabStyle={{ backgroundColor: 'white' }}
textStyle={{ color: 'grey' }}
activeTabStyle={{ backgroundColor: 'white' }}
activeTextStyle={{ color: 'blue' }}>
<Text>TODO: Tab2</Text>
</Tab>
</Tabs>
</Container>
</SafeAreaView>
);
}
}
解决方案
添加tabContainerStyle={{ elevation: 0 }}
到<Tabs>
解决这个问题。它似乎是高程(阴影)而不是边界
推荐阅读
- python - 如果没有给出换行符,则暂停打印
- javascript - ReferenceError 找不到变量 flatlist 和 Element Type Invalid
- delphi - 如何在 Delphi 中包含 CocoaPods?
- wix - Outlook 2007 加载项在通过 MSI/WiX 部署到所有用户时拒绝加载
- javascript - Google Chart - arrayToDataTable 不是数组错误
- html - Jquery .appendTo 在具有相同类的多个 div 上
- kotlin - 无法在 intellij 运行配置中选择主类
- ruby - === 和 match 之间的一行代码的区别?
- c - 如果 printf() 相对于其各自的格式说明符被赋予了不正确的参数类型,C 编译器是否会尝试隐式转换它?
- python-3.x - 如何推送和弹出类中的特定堆栈(这是我的 Stack 类中的两个列表成员)?