| 123456789101112131415161718192021222324252627282930 |
- <template>
- <view class="min-h-62" :style="{ minHeight: minHeight + 'px' }">
- <view class="safe-area-inset-bottom fixed left-0 bottom-0 right-0 z-10 box-border" :class="{ 'shadow-box': shadow }"
- :style="{ height: minHeight + 'px' }">
- <slot></slot>
- </view>
- </view>
- </template>
- <script lang="ts" setup>
- import { useAppStore } from '@/store/appStore';
- const appStore = useAppStore();
- const props = defineProps({
- height: {
- type: Number,
- default: 62
- },
- shadow: {
- type: Boolean,
- default: true
- }
- });
- const minHeight = computed(() => {
- return (appStore.systemInfo.safeAreaInsets?.bottom ?? 0) + props.height;
- });
- </script>
- <style lang="scss" scoped>
- .shadow-box {
- box-shadow: 0 -2px 8px 0 rgba(0, 0, 0, 0.05);
- }
- </style>
|