| | |
| | | <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:{ |
| | |
| | | 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"> |