You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

39 lines
1.0 KiB

<!--页面中头部展示标题使用-->
<script setup lang="ts">
import { toRefs } from 'vue'
import { linkNavigateTo } from '~/utils/util'
const props = defineProps({
//副标题
title: {
type: String,
default: '',
},
//主标题
menuTitle:{
type: String,
default: '',
},
navigateToTitle: {
type: Object,
default: null,
}
})
const { title } = toRefs(props)
const router = useRouter();
const goBack =()=>{
router.back(); // 回退到上一个路由
}
</script>
<template>
<div class="mt-20px mb-20px">
<span class="fontColor333 fonts14 cursors" @click="linkNavigateTo('/')">首页 </span>
<span v-if="navigateToTitle" class="fontColor333 fonts14 cursors" @click="linkNavigateTo(navigateToTitle.linkUrl, {type: 0})"> > {{navigateToTitle.title}}</span>
<span v-if="menuTitle" class="fontColor333 fonts14 cursors" @click="goBack"> > {{menuTitle}}</span>
<span class="text-#666 fonts14"> > {{title}}</span>
</div>
</template>
<style scoped lang="scss"></style>