添加获取胶囊位置函数
This commit is contained in:
@ -198,3 +198,14 @@ export function getNavBarHeight() {
|
|||||||
console.log("🚀 ~ getNavBarHeight ~ navbarHeight:", navbarHeight)
|
console.log("🚀 ~ getNavBarHeight ~ navbarHeight:", navbarHeight)
|
||||||
return navbarHeight
|
return navbarHeight
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getCapsuleOffset() {
|
||||||
|
let rightPadding: string = '24px'
|
||||||
|
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
|
||||||
|
rightPadding = menuButtonInfo.width + 16 + 'px'
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
return rightPadding
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user