官方的aip用了,但是好像没有效果(不知道是不是我的问题,可能是我的页面底部是组件的原因)
索性就另辟蹊径,
我的思路是监听屏幕高度来控制
data(){
return{
// 获取频幕高度
documentHeight: document.documentElement.clientHeight,
}
}
mounted(){
window.onresize = () => {
return (() => {
if (this.documentHeight > document.documentElement.clientHeight) {
//键盘升起时
this.show = false
} else {
//键盘关闭时
this.show = true
}
})();
};
}