提交 94da1395 编写于 作者: DCloud-yyl's avatar DCloud-yyl

兼容input框在软键盘高度变化时显示位置正确(补充)

(cherry picked from commit 070a8f2a)
上级 45d9ca58
......@@ -120,11 +120,11 @@
},
onReady() {
let windowHeight = uni.getWindowInfo().windowHeight;
this.remainHeight = windowHeight - (uni.getElementById('input')?.getBoundingClientRect()?.bottom??windowHeight);
this.inputRemainHeight = windowHeight - (uni.getElementById('input')?.getBoundingClientRect()?.bottom??windowHeight);
},
onResize() {
let windowHeight = uni.getWindowInfo().windowHeight;
this.remainHeight = windowHeight - (uni.getElementById('input')?.getBoundingClientRect()?.bottom??windowHeight);
this.inputRemainHeight = windowHeight - (uni.getElementById('input')?.getBoundingClientRect()?.bottom??windowHeight);
}
}
</script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册