<template>
    <view :style="{ paddingTop: safeAreaInsets?.top + 'px' }">
        <uni-nav-bar :title="title" :border="false" :backgroundColor="backgroundColor" :color="color" left-icon="left">
            <template #left>
                <slot name="left"></slot>
            </template>
            <template #right>
                <slot name="right"></slot>
            </template>
        </uni-nav-bar>
    </view>
</template>

<script setup>
const ps = defineProps({
    title: {
        type: String,
        default: ''
    },
    color: {
        type: String,
        default: '#1D2129'
    },
    backgroundColor: {
        type: String,
        default: '#f7f8fa'
    }
})
// 获取屏幕边界到安全区域距离
const { safeAreaInsets } = uni.getSystemInfoSync()
</script>

<style lang="scss" scoped></style>
