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

 
 
获取输入框中的值
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]}
            />
margin:12px auto 0     
上 左右 下


猜你喜欢

转载自blog.csdn.net/robinson_911/article/details/79992943