| 123456789101112131415161718192021222324 |
- <template>
- <view :style="{ height: statusBarHeight }" class="uni-status-bar">
- <slot />
- </view>
- </template>
- <script>
- export default {
- name: 'UniStatusBar',
- data() {
- const info = uni.getWindowInfo();
- const h = info.statusBarHeight ?? 20;
- return {
- statusBarHeight: h + 'px'
- };
- }
- };
- </script>
- <style lang="scss">
- .uni-status-bar {
- background: #ffffff;
- }
- </style>
|