收藏
回答

获取windowHeigh高度真机模拟器不一样,更新微信开发工具后1.06.2412050版本?

  const windowInfo = wx.getWindowInfo()

      let bottomSafe = windowInfo.screenHeight - windowInfo.safeArea.bottom

      let windowHeight = wx.getWindowInfo().windowHeight

      let statusBarHeight = wx.getWindowInfo().statusBarHeight

      const deviceInfo = wx.getDeviceInfo()

      const system = deviceInfo.system

      const isWindow = system.includes('Windows')

      let scrollH = ''

      if (isWindow{

        scrollH = windowHeight

      } else {

        scrollH = windowHeight - statusBarHeight - 150 - bottomSafe

      }


回答关注问题邀请回答
收藏

1 个回答

  • 智能回答 智能回答 该问答由AI生成
    2025-04-25
    有用
登录 后发表内容