hulai-website/components/faq/FaqCategory.vue
刘涛 a25f3a77ce sync: 同步最新呼籁官网代码到仓库
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 21:57:35 +08:00

44 行
933 B
Vue

<template>
<section :id="category.id" class="faq-category">
<h2 class="faq-category-title">{{ category.name }}</h2>
<div class="faq-category-list">
<FaqItem
v-for="q in category.questions"
:key="q.id"
:question="q.question"
:answer="q.answer"
:related-links="q.relatedLinks"
:initial-open="initialOpen"
/>
</div>
</section>
</template>
<script setup>
defineProps({
category: { type: Object, required: true },
initialOpen: { type: Boolean, default: false },
})
</script>
<style lang="less" scoped>
.faq-category {
margin-bottom: @space-2xl;
scroll-margin-top: 80px;
}
.faq-category-title {
font-size: @font-size-xl;
color: @color-primary;
margin-bottom: @space-lg;
padding-bottom: @space-sm;
border-bottom: 2px solid @color-primary-lighter;
}
.faq-category-list {
display: flex;
flex-direction: column;
gap: @space-md;
}
</style>