TextInput

作者: 物联白菜 | 来源:发表于2021-03-12 16:57 被阅读0次

描述(多行输入)

<TextInput
                                        textAlignVertical='top'
                                        style={{fontSize:13,height:125}}
                                        placeholder={'请您填写您的宝贵建议以便我们提供更好的服务'}
                                        placeholderTextColor="#B6B6C5"
                                        multiline={true}  //允许多行输入
                                        maxLength={300}
                                        underlineColorAndroid={'transparent'}
                                        clearButtonMode={'always'}
                                        onChangeText={(text)=>this.setState({contentText:text})}
                                    />
                                    <Text style={{textAlign:'right'}}>{this.state.contentText.length}/300</Text>

联系方式

<TextInput
                                        placeholder="选填,便于我们与您联系"
                                        placeholderTextColor='#B6B6C5'
                                        multiline={false}
                                        maxLength={11}
                                        style={{fontSize:16}}
                                        onChangeText={(text)=>this.setState({title:text})}
                                        underlineColorAndroid={'transparent'}
                                    />

相关文章

网友评论

      本文标题:TextInput

      本文链接:https://www.haomeiwen.com/subject/hkmzqltx.html