主要代码如下:
public docmHeight = document.documentElement.clientHeight || document.body.clientHeight; // 获取页面可见高度 public showHeight= document.documentElement.clientHeight || document.body.clientHeight; // 设置初始位页面可见高度 public isShow= true ; // 设置初始底部tab可见 @Watch('showHeight') public onShowHeightChanged() { if (this.docmHeight > this.showHeight) { // 当唤起键盘显示后,设置底部tab隐藏 this.hideshow = false; } else { this.hideshow = true; } }