1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <template>
- <!-- 头部占位 -->
- <view>
- <!-- #ifdef APP-PLUS || MP -->
- <view class="sys-head" :style="{height:sysHeight}"></view>
- <!-- #endif -->
- <!-- #ifdef MP || APP-PLUS -->
- <view class="sys-title">{{title}}</view>
- <!-- #endif -->
- </view>
- </template>
- <script>
- let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
- export default {
- props: {
- title:{
- type:String,
- default:''
- }
- },
- data() {
- return {
- sysHeight: sysHeight
- }
- },
- }
- </script>
- <style scoped>
- .sys-title {
- z-index: 10;
- position: relative;
- height: 40px;
- line-height: 40px;
- font-size: 30rpx;
- color: #fff;
- background-color: var(--view-theme);
- // #ifdef MP || APP-PLUS
- text-align: center;
- // #endif
- }
- .sys-head {
- background-color: #fff;
- }
- </style>
|