<script setup>
  const props = defineProps({
    position: {
      type: String,
      default: 'fixed'
    }
  })
</script>

<template>
  <view :style="{ position: props.position }" class="bottom-view">
    <slot></slot>
  </view>
</template>

<style lang="scss" scoped>
  .bottom-view {
    // position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16rpx 24rpx calc(env(safe-area-inset-bottom) + 20rpx); /* 关键：适配 iPhone 等安全区域 */
    background: #fff;
    box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1);
    z-index: 90;
  }
</style>
