接入指南 API 工具 其他

菜单

qg.getMenuButtonBoundingClientRect()

获取菜单按钮(右上角胶囊按钮)的布局位置信息。坐标信息以屏幕左上角为原点。

返回值

Object

菜单按钮的布局位置信息

属性类型说明
widthNumber宽度,单位:px
heightNumber高度,单位:px
topNumber上边界坐标,单位:px
rightNumber右边界坐标,单位:px
bottomNumber下边界坐标,单位:px
leftNumber左边界坐标,单位:px

示例代码

const res = qg.getMenuButtonBoundingClientRect();

console.log(res.width);
console.log(res.height);
console.log(res.top);
console.log(res.right);
console.log(res.bottom);
console.log(res.left);

条匹配 "" 的结果

    没有搜索到与 "" 相关的内容