我在React Native中使用TextInput,如果我尝试向组件添加边框,那么在我的彩色边框上总是有一个正方形的黑色边框。React Native TextInput总是有黑色边框
当我删除我的彩色边框组件看起来是这样的:
这里是我的代码:
<TextInput
returnKeyType="search"
style={searchStyle.searchInput}
onChangeText={(text) => this.setState({text})}
placeholder={this.state.searchText}
onSubmitEditing={(event) => this.searchLocationSubmit(event)}
/>
const searchStyle = StyleSheet.create({
searchInput : {
height: 35,
color: '#64AFCB',
borderColor: '#64AFCB',
borderWidth: 1,
borderStyle: 'solid',
borderRadius: 15,
width: 200,
marginLeft: 10,
marginTop: 10,
backgroundColor: 'white',
position: 'absolute',
zIndex: 2
}
})