Files
cz-web/src/views/profile/cpns/HelpFaq.vue
2026-10-13 15:16:13 +08:00

88 lines
1.6 KiB
Vue

<script setup lang="ts">
import type { HelpFaqGroup } from '@/types/business/profile'
interface Props {
groups: HelpFaqGroup[]
}
defineProps<Props>()
</script>
<template>
<div class="help-faq">
<section
v-for="(group, gi) in groups"
:key="group.title"
class="help-faq__group"
>
<h3 class="help-faq__group-title">
{{ gi + 1 }}、{{ group.title }}
</h3>
<div
v-for="item in group.items"
:key="item.q"
class="help-faq__item"
>
<p class="help-faq__q">
Q: {{ item.q }}
</p>
<p class="help-faq__a text-secondary">
{{ item.a }}
</p>
</div>
</section>
<p v-if="groups.length === 0" class="help-faq__empty text-secondary">
暂无常见问题
</p>
</div>
</template>
<style lang="less" scoped>
.help-faq {
.flex(column, flex-start);
width: 100%;
&__group {
& + & {
margin-top: @spacing-xl;
}
}
&__group-title {
font-size: @font-size-base;
font-weight: 600;
color: @heading-color;
line-height: 1.4;
text-align: left;
}
&__item {
margin-top: @spacing-base;
padding: @spacing-base;
border-radius: @radius-base;
background: @bg-color-light;
}
&__q {
font-size: @font-size-base;
font-weight: 600;
color: @heading-color;
line-height: 1.4;
}
&__a {
margin: @spacing-sm 0 0;
font-size: @font-size-sm;
line-height: 1.6;
color: @text-color-secondary;
}
&__empty {
padding: @spacing-xxl 0;
text-align: center;
font-size: 13px;
}
}
</style>