From 134c7e51d33dfd0cdb9e7d47b22d181ebc1bcdc8 Mon Sep 17 00:00:00 2001
From: Liuyi <candymxq888@outlook.com>
Date: 星期一, 07 十月 2024 17:27:20 +0800
Subject: [PATCH] 添加用户详情页,修改主页用户及会员卡信息

---
 components/navbar/navbar.vue |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/components/navbar/navbar.vue b/components/navbar/navbar.vue
index 78ecbbe..26a5679 100644
--- a/components/navbar/navbar.vue
+++ b/components/navbar/navbar.vue
@@ -1,15 +1,14 @@
 <template>
 	<view class="navbar">
-		<image src="../../static/images/addCard/back.png" alt="" @click="navBackToChild()"></image>
+		<image src="../../static/images/addCard/back.png" alt="" @click="navBackTo()"></image>
 		<text>{{title}}</text>
 	</view>
 </template>
 
 <script setup>
-	import { ref } from 'vue'
-	const emit = defineEmits(['navBackTo'])
-	function navBackToChild(){
-		emit('navBackTo')
+	import { onMounted, ref ,watch} from 'vue'
+	function navBackTo(){
+		uni.navigateBack()
 	}
 	const props = defineProps({
 		title:{
@@ -17,7 +16,12 @@
 			default:''
 		}
 	})
-	const title = ref(props.title)
+	const pageTitle = ref(props.title)
+	watch(props.title,(New, Old)=>{
+			pageTitle.value = New
+		},
+		{immediate: true},
+	)
 </script>
 
 <style lang="scss">

--
Gitblit v1.9.3