zoukankan      html  css  js  c++  java
  • 移动端 提交按钮呗软键盘挤上去的问题解决

     data() {
        return {
          docmHeight: document.documentElement.clientHeight,
          showHeight: document.documentElement.clientHeight,
          hideClass: false,
        }
      },
     
    methods{
    // 检测屏幕高度变化
        inputType() {
          if (!this.timer) {
            this.timer = true
            const that = this
            setTimeout(() => {
              if (that.docmHeight > that.showHeight) {
              // 显示class
                this.hideClass = true
              } else if (that.docmHeight <= that.showHeight) {
                // 显示隐藏
                this.hideClass = false
              }
              that.timer = false
            }, 20)
          }
        },
    }
     mounted() {
        // window.onresize监听页面高度的变化
        window.onresize = () => (() => {
          window.screenHeight = document.body.clientHeight
          this.showHeight = window.screenHeight
        })()
      },
  • 相关阅读:
    Linux安装cx_Oracle
    LVM分区
    命令行重启远程桌面服务
    常用Linux命令
    自动清理N天前的二进制日志
    MySQL常用操作
    Java里的堆(heap)栈(stack)和方法区(method)
    SpringMVC 八大注解
    Spring Cloud原理详解
    java线程的生命周期及五种基本状态
  • 原文地址:https://www.cnblogs.com/wsj1/p/14148812.html
Copyright © 2011-2022 走看看