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.
56 lines
1.2 KiB
56 lines
1.2 KiB
<template>
|
|
<view class="header" :style="{'height': height+'px','padding-top':statusBarHeight+'px'}">
|
|
<image src="https://static.ticket.sz-trip.com/epicSoul/readingBody/search.png" mode="heightFix"
|
|
@click="gotoPath('/subPackages/search/search?type='+type)" v-if="isSearch"></image>
|
|
<view style="width: 50rpx;" v-else></view>
|
|
<image src="https://static.ticket.sz-trip.com/uploads/20250625/9bb05097e07570a934235983e1681a9f.png" mode="heightFix"></image>
|
|
<view style="width: 50rpx;"></view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
isSearch: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
type: {
|
|
type: String,
|
|
default: ''
|
|
}
|
|
},
|
|
name:"header",
|
|
data() {
|
|
return {
|
|
// 导航栏参数
|
|
height: 0,
|
|
statusBarHeight: 0,
|
|
};
|
|
},
|
|
mounted() {
|
|
this.initRectInfo()
|
|
},
|
|
methods:{
|
|
initRectInfo () {
|
|
const sysInfo = uni.getSystemInfoSync()
|
|
this.statusBarHeight = sysInfo.statusBarHeight
|
|
// 默认高度
|
|
this.height = sysInfo.statusBarHeight + 40
|
|
console.log("sysInfo" ,sysInfo)
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.header{
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-around;
|
|
image{
|
|
height: 46.16rpx;
|
|
}
|
|
}
|
|
</style>
|