getMenuButtonBoundingClientRect()模拟器返回值错误?
发布于 5 年前 作者 li93 11826 次浏览 来自 问答
const MenuRect = wx.getMenuButtonBoundingClientRect()
 
const statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
 
console.log(MenuRect, statusBarHeight);
//{width: 87, height: 32, left: 278, top: 6, right: 365, …} 20

状态栏高度没理由会比胶囊的top值要大。

真机测试没这个问题。

开发工具版本1.02.1912062 for MAC.

1 回复

必现吗?真机是否正常?

回到顶部