在react-native开发中,我们有时间需要用到border的样式为虚线
borderStyle: "dashed",
发现不生效,查资料可知,原理他需要和borderRadius一起使用
borderStyle: "dashed",
borderRadius: 0,
这样就可以了。
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
TextInput设置多行显示时,设置了TextInput的高度,发现文字垂直居中了,只需在样式里面设置textAlignVertical: 'top’即可。
<TextInput
style={[ {width: "100%", height: 100, textAlignVertical: 'top'}]}
placeholder={"请输入不超过200字的个人简介"}
placeholderTextColor={"#5d5d7e"}
value={this.state.intro}
maxLength={200}
multiline = {true}
onChangeText={(intro) => this.setState({intro})}
/>