<template>
  <view class="status-bar" :style="{ height: `${height}px` }"></view>
</template>

<script setup lang="ts">
import { onMounted, ref } from 'vue'

const height = ref(0)

onMounted(() => {
  try {
    const info = uni.getSystemInfoSync()
    height.value = info.statusBarHeight || 0
  } catch (e) {
    height.value = 0
  }
})
</script>
