Files
yunzerwebsiteallinone/uniapp/utils/mpHead.js
T
2026-11-16 17:22:50 +08:00

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 {}
}