has.getMenuButtonBoundingClientRect(): Object
获取菜单按钮(右上角胶囊按钮)的布局位置信息。坐标信息以屏幕左上角为原点。
布局信息包含了元服务menuBar的左右margin。
起始版本: 1.0.10
约束与限制:
当前接口在元服务被嵌入式运行时暂不支持使用,建议规避或替换类似功能接口。
返回值:
返回菜单按钮布局位置信息的Object对象,包括以下字段。
示例:
const res = has.getMenuButtonBoundingClientRect(); console.info(res.width); console.info(res.height); console.info(res.top); console.info(res.right); console.info(res.bottom); console.info(res.left);