13 lines
244 B
JavaScript
13 lines
244 B
JavaScript
export function mpHeadPad(extra = 8) {
|
|
// #ifdef MP-WEIXIN
|
|
try {
|
|
const mb = uni.getMenuButtonBoundingClientRect()
|
|
if (mb && mb.bottom > 0) {
|
|
return { paddingTop: mb.bottom + extra + 'px' }
|
|
}
|
|
} catch (e) {
|
|
}
|
|
// #endif
|
|
return {}
|
|
}
|