Appearance
mp-safe-layout 底部安全边距适配容器
介绍文档:安全区域适配
代码演示
vue
<template>
<!-- 当没有安全区域时,下边距为 20;当存在安全区域时,下边距为 safe-area-inset-bottom -->
<mp-safe-layout class="page" :bottom="20"> ... </mp-safe-layout>
</template>
API
Props
Prop name | Description | Type | Values | Default |
---|---|---|---|---|
top | 顶部边距 | number | - | 0 |
bottom | 底部边距,在有安全区域的情况下,将与安全区域的边距值进行比较,然后取二者之中的最大值 | number | - | 0 |
Slots
Name | Description | Bindings |
---|---|---|
default |