uni-status-bar.vue 437 B

1234567891011121314151617181920212223242526
  1. <template>
  2. <view :style="{ height: statusBarHeight }" class="uni-status-bar">
  3. <slot />
  4. </view>
  5. </template>
  6. <script>
  7. var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px'
  8. export default {
  9. name: 'UniStatusBar',
  10. data() {
  11. return {
  12. statusBarHeight: statusBarHeight
  13. }
  14. }
  15. }
  16. </script>
  17. <style scoped>
  18. .uni-status-bar {
  19. width: 750rpx;
  20. height: 20px;
  21. /* height: var(--status-bar-height);
  22. */
  23. }
  24. </style>