aijinan-app-newVersion/src/components/title.vue
2025-05-14 17:25:59 +08:00

45 lines
919 B
Vue

<template>
<div class="title">
<p>{{title}}</p>
<img src="../assets/img/arraw.svg" alt="" @click="goToMore"/>
</div>
</template>
<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()
const props = defineProps({
title: {
type: String,
default: ''
},
channelId: {
type: [String, Number],
default: ''
},
channelName: {
type: String,
default: ''
}
})
const goToMore=()=>{
console.log('跳转到栏目列表页', props.channelId)
router.push({
name: 'ChannelList',
query: {
channelId: props.channelId,
title: props.channelName || props.title
}
})
}
</script>
<style lang="scss" scoped>
.title{
display: flex;
justify-content: space-between;
align-items: center;
padding-top:10px;
font-size: 16px;
font-weight: bolder;
}
</style>