【前端】纸掌柜h5端
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.

43 lines
750 B

<template>
<view
class="header"
:style="{
height: `${statusBarHeight + 44}px`,
paddingTop: `${statusBarHeight}px`
}"
>
<slot name="icon">
<uni-icons type="back" size="24" @click="back" />
</slot>
<slot></slot>
</view>
</template>
<script>
import { back } from '@/utils/hook.js'
export default {
data() {
return {
statusBarHeight: 20
}
},
mounted() {
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight - 0
},
methods: {
back
}
}
</script>
<style lang="scss">
.header {
width: 750rpx;
padding: 0 32rpx 10rpx 20rpx;
background-color: #fff;
display: flex;
flex-direction: row;
align-items: center;
border-bottom: 2rpx solid #d8d8d8;
}
</style>