Liuyi
2024-11-30 493d712b9b7d7821e71f9fee6f2078e023ef4f5f
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
53
54
<template>
    <view class="navbar">
        <image src="../../static/images/other/navBack.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,#5EA1FA,#8BC1FC);
       display: flex;
       align-items: flex-end;
       box-sizing: border-box;
       position: relative;
       padding:0 32rpx 24rpx;
       image{
           width:40rpx;
           height:40rpx;
           transform: rotate(180deg);
       }
       text{
           font-weight: 400;
           font-size: 36rpx;
           color: #000000;
           position:absolute;
           width:200rpx;
           left:calc(50% - 100rpx);
           text-align: center;
           color: #e4ecf9;
           letter-spacing:1rpx;
       }
   }
</style>