16 lines
364 B
Vue
16 lines
364 B
Vue
<!-- 自定义状态栏 -->
|
|
<template>
|
|
<view :style="{ height: statusBarHeight }" class="uni-status-bar"><slot /></view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import peach from '@/peach'
|
|
|
|
const statusBarHeight = peach.$platform.device.statusBarHeight + 'px'
|
|
</script>
|
|
<style lang="scss">
|
|
.uni-status-bar {
|
|
height: var(--status-bar-height);
|
|
}
|
|
</style>
|