谁能打救这个神奇的bug
发布于 6 年前 作者 xiulanyu 8093 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)
try {
        let { top, height } = wx.getMenuButtonBoundingClientRect();
        if (!top) top = 20;
        if (!height) height = 48;
        this.setData({
          top: top + height + 8
        })
    } catch (e) {}
  • 预期表现

正常 ,至少try catch下要保证不报错吧?

  • 复现路径
  • 提供一个最简复现 Demo
1 回复
回到顶部