<template>
  <view :style="{ paddingTop: statusBarHeight + 'px' }"></view>
  <view v-if="navbarShow" style="margin-bottom: 44px">
    <u-navbar leftText="返回" :title="navbar_title" :safeAreaInsetTop="true">
      <template #left>
        <view class="u-nav-slot" style="display: flex">
          <u-icon name="arrow-left" size="19"></u-icon>
          <u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
          <u-icon name="home" size="20"></u-icon>
        </view>
      </template>
    </u-navbar>
  </view>
</template>
<script setup>
import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance } from "vue";

const props = defineProps({
  navbarShow: {
    type: Boolean,
    default: false,
  },
  navbarTitle: {
    type: String,
    default: "",
  },
});

const navbar_title = ref(props.navbarTitle);
const navbar_show = ref(props.navbarShow);
const statusBarHeight = ref(0);

onLoad((option) => {
  let systemInfo = uni.getSystemInfoSync();
  statusBarHeight.value = systemInfo.statusBarHeight; //获取刘海屏高度
});
</script>
