2023-07-06 17:08:59 +08:00
|
|
|
<template>
|
|
|
|
<view class="headInfo">
|
2023-08-24 16:22:29 +08:00
|
|
|
<uni-icons class="icon" type="back" size="24" @click="toBack" />
|
2023-07-06 17:08:59 +08:00
|
|
|
{{title}}
|
2023-08-24 16:22:29 +08:00
|
|
|
<uni-icons class="bottom" type="bottom" size="18" v-if="type" />
|
2023-07-06 17:08:59 +08:00
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: "headView",
|
|
|
|
props: {
|
|
|
|
title: {
|
|
|
|
type: String
|
|
|
|
},
|
2023-08-24 16:22:29 +08:00
|
|
|
type: {
|
|
|
|
type: Boolean,
|
|
|
|
default: () => false
|
2023-08-24 17:06:35 +08:00
|
|
|
},
|
|
|
|
url: {
|
|
|
|
type: String,
|
|
|
|
default: () => ""
|
|
|
|
},
|
2023-07-06 17:08:59 +08:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
toBack() {
|
2023-08-24 17:06:35 +08:00
|
|
|
if (this.url != "") {
|
|
|
|
uni.navigateTo({
|
|
|
|
url: `${this.url}`
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
uni.navigateBack('-1')
|
|
|
|
}
|
2023-07-06 17:08:59 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2023-07-25 13:18:37 +08:00
|
|
|
<style lang="less" scoped>
|
2023-07-06 17:08:59 +08:00
|
|
|
.headInfo {
|
|
|
|
position: relative;
|
|
|
|
background-color: #fff;
|
2023-07-12 18:06:16 +08:00
|
|
|
border-bottom: 1px solid #999999;
|
2023-08-24 16:22:29 +08:00
|
|
|
height: 68px;
|
|
|
|
line-height: 68px;
|
|
|
|
font-size: 20px;
|
|
|
|
color: #23262E;
|
2023-07-06 17:08:59 +08:00
|
|
|
text-align: center;
|
2023-08-24 16:22:29 +08:00
|
|
|
font-weight: bold;
|
|
|
|
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.10);
|
2023-07-06 17:08:59 +08:00
|
|
|
|
|
|
|
.icon {
|
|
|
|
position: absolute;
|
|
|
|
left: 10px;
|
|
|
|
}
|
|
|
|
|
2023-08-24 16:22:29 +08:00
|
|
|
.bottom {
|
|
|
|
margin-left: 6px;
|
|
|
|
}
|
2023-07-06 17:08:59 +08:00
|
|
|
}
|
2023-07-12 18:06:16 +08:00
|
|
|
</style>
|