36 lines
650 B
Vue
36 lines
650 B
Vue
|
<template>
|
||
|
<view class="">
|
||
|
<view class="nav ">
|
||
|
<slot></slot>
|
||
|
</view>
|
||
|
<view class="place">
|
||
|
|
||
|
</view>
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script setup>
|
||
|
const res = wx.getSystemInfoSync();
|
||
|
const statusHeight = res.statusBarHeight; //状态栏高度
|
||
|
const cusnavbarheight = (statusHeight + 44) + "px";
|
||
|
</script>
|
||
|
|
||
|
<style lang="scss" scoped>
|
||
|
.nav {
|
||
|
width: calc(100% - 60rpx);
|
||
|
padding: 0 30rpx;
|
||
|
height: v-bind(cusnavbarheight);
|
||
|
background: linear-gradient(270deg, #256FBC 0%, #044D87 100%);
|
||
|
|
||
|
font-size: 24rpx;
|
||
|
color: #FFFFFF;
|
||
|
position: fixed;
|
||
|
top: 0;
|
||
|
left: 0;
|
||
|
z-index: 99;
|
||
|
}
|
||
|
|
||
|
.place {
|
||
|
height: v-bind(cusnavbarheight);
|
||
|
}
|
||
|
</style>
|