提交 070a8f2a 编写于 作者: DCloud-yyl's avatar DCloud-yyl

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

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