获取输入框中的值
const phoneVal = this.dataPhone.refs.input.value;
布局如下:
<TextInput
placeholder={'输入手机号'}
autoFocus multiline
keyboardType={'number-pad'}
maxLength={11}
ref={(name) => {
this.dataPhone = name;
}}
style={[styles.flexCls, styles.inputCls]}
/>