🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
> [TextInput](http://facebook.github.io/react-native/docs/textinput.html#content) ## 属性 | 名称 | 类型 | 意义 | 默认值 | | --- | --- | --- | --- | | autoCapitalize | enum(‘none’, ‘sentences’, ‘words’, ‘characters’) | 针对哪种类型自动大小写 | 无 | | autoCorrect | bool | 自动更正 | true | | autoFocus | bool | 自动对焦 | false | | defaultValue | string | 默认显示的值 | 无 | | editable | bool | 是否可编辑 | 无 | | keyboardType | enum(“default”, ‘numeric’, ‘email-address’, “ascii-capable”, ‘numbers-and-punctuation’, ‘url’, ‘number-pad’, ‘phone-pad’, ‘name-phone-pad’, ‘decimal-pad’, ‘twitter’, ‘web-search’) | 键盘类型 | 无 | | multiline | bool | 是否支持多行 | false | | onBlur | function | 输入的信息模糊时回调该函数 | 无 | | onChange | function | 输入框中文本信息改变时调用该函数 | 无 | | onChangeText | function | 输入框中文本信息改变时调用该函数,参数为被改变的文本 | 无 | | onEndEditing | function | 输入结束时调用的函数 | 无 | | onFocus | function | 当光标在输入框上调用的函数 | 无 | | onLayout | function | 改变输入框的布局时调用的函数 | 无 | | onSubmitEditing | function | 当提交输入时调用的函数 | 无 | | placeholder | string | 输入框的提示信息 | 无 | | placeholderTextColor | string | 输入框提示信息的颜色 | 无 | | secureTextEntry | bool | 安全文本,比如密码框 | false | | style | style | 样式 | 无 | | testID | string | 用于测试的id号 | 无 | | textAlign | enum(‘start’, ‘center’, ‘end’) | 文本较之输入框的布局 | 无 | | value | string | 文本框的值 | 无 | | clearButtonMode | enum(‘never’, ‘while-editing’, ‘unless-editing’, ‘always’) | (iOS特有)输入框的右边清除按钮出现的时机 | 无 | | clearTextOnFocus | bool | (iOS特有)当编辑开始时是否情况里面的文本 | 无 | | enablesReturnKeyAutomatically | bool | (iOS特有)为true时,没有文本时,ruturn按钮是不见的,当有文本时,自动显示 | false | | maxLength | number | (iOS特有)最大长度 | 无 | | returnKeyType | enum(‘default’, ‘go’, ‘google’, ‘join’, ‘next’, ‘route’, ‘search’, ‘send’, ‘yahoo’, ‘done’, ‘emergency-call’) | return键的类型 | 无 | | selectTextOnFocus | bool | 选择文本时自动对焦 | 无 | | selectionState | DocumentSelectionState | 状态 | 无 | | textAlignVertical | enum(‘top’, ‘center’, ‘bottom’) | (android特有)垂直方向上的布局 | 无 | | underlineColorAndroid | string | 下划线的颜色 | 无 |