Taro.getMenuButtonBoundingClientRect()
Gets the location of the menu button (the Mini Program control button in the upper right corner). The top left corner of the screen is the origin.
Type
() => Rect
Parameters
Rect
The location of the menu button
Property | Type | Description |
---|---|---|
width | number | Width (in px) |
height | number | Height (in px) |
top | number | The coordinate of the upper boundary (in px) |
right | number | The coordinate of the right boundary (in px) |
left | number | The coordinate of the left boundary (in px) |
bottom | number | The coordinate of the bottom boundary (in px) |
API Support
API | WeChat Mini-Program | H5 | React Native |
---|---|---|---|
Taro.getMenuButtonBoundingClientRect | ✔️ |