45 lines
919 B
Vue
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>
|
|
|