su-status-bar.vue 385 B

12345678910111213141516
  1. <template>
  2. <view :style="{ height: statusBarHeight }" class="uni-status-bar"><slot /></view>
  3. </template>
  4. <script setup>
  5. import sheep from '@/sheep';
  6. import { computed } from 'vue';
  7. const statusBarHeight = sheep.$platform.device.statusBarHeight + 'px';
  8. </script>
  9. <style lang="scss">
  10. .uni-status-bar {
  11. // width: 750rpx;
  12. height: var(--status-bar-height);
  13. }
  14. </style>