添加获取胶囊位置函数
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user