su-status-bar.vue 379 B

12345678910111213141516
  1. <!-- 自定义状态栏 -->
  2. <template>
  3. <view :style="{ height: statusBarHeight }" class="uni-status-bar"><slot /></view>
  4. </template>
  5. <script setup>
  6. import sheep from '@/sheep';
  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>