Skip to content

t-safe-bottom

SafeBottom 安全底部

组件介绍

底部安全区组件,自动获取状态栏高度占位,H5端高度一般获取为0。

平台兼容

HarmonyH5AndroidiOS小程序UTS

基础用法

vue
<template>
  <view class="page">
    <view class="content">
      <!-- 页面内容 -->
    </view>
    <t-safe-bottom></t-safe-bottom>
  </view>
</template>

<style scoped>
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.content {
  flex: 1;
  padding: 20rpx;
}
</style>

Slots

插槽名说明
default内容插槽,可以在安全区域内放置内容