Files
laravel-manager-packagist/resources/blocks/vue/Faq.vue
T
2026-12-04 17:50:18 +00:00

20 lines
756 B
Vue

<script setup lang="ts">
import { classes } from './support';
// The `FAQPage` data for search engines comes from the server (`structured_data` of the page API, or `Blocks::structuredData()`):
// print it in the head of the page; a Vue template cannot hold a script tag.
defineProps<{ data: Record<string, any>; style?: Record<string, string> }>();
</script>
<template>
<section :class="['mb-block mb-faq', classes(style)]">
<div class="mb-inner">
<h2 v-if="data.title">{{ data.title }}</h2>
<details v-for="(item, index) in data.items || []" :key="index">
<summary>{{ item.question }}</summary>
<p>{{ item.answer }}</p>
</details>
</div>
</section>
</template>