fix: add css var safe padding bottom

This commit is contained in:
YunYouJun
2023-11-06 02:00:56 +08:00
parent 85c8f4fcd1
commit d3ab8fb2c1
4 changed files with 13 additions and 10 deletions

View File

@@ -38,24 +38,21 @@ const route = useRoute()
const router = useRouter()
function onClick(item: BottomMenuItem) {
router.push(item.to || '/')
// router.push(item.to || '/')
router.replace(item.to || '/')
}
</script>
<template>
<YlfBottomMenu shadow-2xl>
<YlfBottomMenu shadow-2xl pb="$cook-bottom-menu-padding-bottom">
<YlfBottomMenuItem
v-for="item in items"
:key="item.to"
:item="item"
:active="route.path === item.to"
@click="onClick"
class="pt-3"
style="backdrop-filter: blur(10px);"
/>
</YlfBottomMenu>
</template>
<style>
.ylf-bottom-menu {
padding-bottom: env(safe-area-inset-bottom);
}
</style>