You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
shangmenanmo/components/uni-status-bar.vue

29 lines
446 B

<template>
<view class="uni-status-bar" :style="style">
<slot></slot>
</view>
</template>
<script>
export default {
computed: {
style() {
//#ifdef APP-PLUS
return ''
//#endif
//#ifndef APP-PLUS
return `height:${uni.getSystemInfoSync().statusBarHeight}px`
//#endif
}
}
}
</script>
<style>
.uni-status-bar {
display: block;
width: 100%;
height: 20px;
height: var(--status-bar-height);
}
</style>