input唤起键盘影响移动端底部fixed定位

主要代码如下:

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;
    }
}

  

posted @ 2020-05-09 16:01  因为有你so  阅读(294)  评论(0编辑  收藏  举报