getMenuButtonBoundingClientRect
获取菜单按钮(右上角胶囊按钮)的布局位置信息。坐标信息以屏幕左上角为原点。
引入
import { getMenuButtonBoundingClientRect } from '@ray-js/ray';
需引入
MiniKit,且在>=2.3.0版本才可使用
参数
Object object
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| complete | function |
否 | 接口调用结束的回调函数(调用成功、失败都会执行) | |
| success | function |
否 | 接口调用成功的回调函数 | |
| fail | function |
否 | 接口调用失败的回调函数 |
object.success 回调参数
参数
Object res
| 属性 | 类型 | 说明 |
|---|---|---|
| width | number |
宽度,单位:px |
| height | number |
高度,单位:px |
| top | number |
上边界坐标,单位:px |
| right | number |
右边界坐标,单位:px |
| bottom | number |
下边界坐标,单位:px |
| left | number |
左边界坐标,单位:px |
object.fail 回调参数
参数
Object res
| 属性 | 类型 | 说明 |
|---|---|---|
| errorMsg | string |
插件错误信息 |
| errorCode | string |
错误码 |
| innerError | object |
插件外部依赖错误信息 {errorMsg: string, errorCode: string } |
👉

最低0.47元/天 解锁文章
1410

被折叠的 条评论
为什么被折叠?



