当前位置: 代码迷 >> 综合 >> Rax--TextInput--获取输入框中的值
  详细解决方案

Rax--TextInput--获取输入框中的值

热度:61   发布时间:2023-12-15 01:14:57.0
获取输入框中的值
const phoneVal = this.dataPhone.refs.input.value;
布局如下:<TextInputplaceholder={'输入手机号'}autoFocus multilinekeyboardType={'number-pad'}maxLength={11}ref={(name) => {this.dataPhone = name;}}style={[styles.flexCls, styles.inputCls]}/>