1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
| <template>
| <view class="navbar">
| <image src="../../static/images/pointMall/back.svg" alt="" @click="navBackTo()"></image>
| <text>{{title}}</text>
| </view>
| </template>
|
| <script setup>
| import { onMounted, ref ,watch} from 'vue'
| function navBackTo(){
| uni.navigateBack()
| }
| const props = defineProps({
| title:{
| type:String,
| default:''
| }
| })
| const pageTitle = ref(props.title)
| watch(props.title,(New, Old)=>{
| pageTitle.value = New
| },
| {immediate: true},
| )
| </script>
|
| <style lang="scss">
| .navbar{
| width:100%;
| height:176rpx;
| background: linear-gradient(to bottom,#fbd1a2 0%,#fef7da 70%,#fef7da 100%);
| display: flex;
| align-items: flex-end;
| box-sizing: border-box;
| position: relative;
| padding:0 32rpx 24rpx;
| image{
| width:40rpx;
| height:40rpx;
| }
| text{
| position:absolute;
| width:200rpx;
| left:calc(50% - 100rpx);
| text-align: center;
| letter-spacing:1rpx;
| color: #e5b25f;
| font-weight:600;
| font-size:36rpx;
| }
| }
| </style>
|
|