uniapp中input框聚焦

在需要聚焦的方法内写入

this.Focus = true;
// 获取软键盘的高度
uni.onKeyboardHeightChange(res => {
	console.log(res.height);
	if (res.height === 0) {
	this.Focus = false;
}
})

然后在失去焦点的时候

this.Focus = false;

你可能感兴趣的:(uni-app,前端,vue.js)