Files
template-nuxt4/app/components/home/SectionHeader.vue
2026-04-29 01:33:33 +08:00

59 lines
924 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="section-header">
<div class="header-left">
<span class="icon">{{ icon }}</span>
<h2 class="title">{{ title }}</h2>
</div>
<NuxtLink v-if="moreLink" :to="moreLink" class="more-link">
查看更多
</NuxtLink>
</div>
</template>
<script lang="ts" setup>
defineProps<{
title: string
icon?: string
moreLink?: string
}>()
</script>
<style scoped>
.section-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 24px;
padding-bottom: 16px;
border-bottom: 3px solid #1e3a5f;
}
.header-left {
display: flex;
align-items: center;
gap: 12px;
}
.icon {
font-size: 24px;
}
.title {
font-size: 22px;
font-weight: 700;
color: #1e3a5f;
margin: 0;
}
.more-link {
color: #666;
font-size: 14px;
text-decoration: none;
transition: color 0.2s;
}
.more-link:hover {
color: #1e3a5f;
}
</style>