添加获取胶囊位置函数

This commit is contained in:
wangxiaowei
2025-08-16 14:46:32 +08:00
parent e7bea07ecd
commit bd2a6c1d2a

View File

@ -197,4 +197,15 @@ export function getNavBarHeight() {
console.log("🚀 ~ getNavBarHeight ~ navbarHeight:", 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
}