primevue-mirror/components/doc/DocSections.vue

27 lines
1.0 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<template v-for="(doc, i) of docs" :key="doc.label + '_' + i">
<section class="py-4">
2023-02-28 08:29:30 +00:00
<template v-if="doc.children">
<div :id="doc.id">
2024-04-24 22:43:32 +00:00
<DocSectionText :id="doc.id" :label="doc.label" :badge="doc.badge">
2024-05-13 21:48:50 +00:00
<p v-if="doc.description" v-html="doc.description"></p>
2023-02-28 08:29:30 +00:00
</DocSectionText>
</div>
<template v-for="comp of doc.children" :key="comp.label">
2024-04-24 22:43:32 +00:00
<component :is="{ ...comp.component }" :id="comp.id" :label="comp.label" :data="comp.data" :badge="comp.badge" :description="comp.description" :level="2" />
2023-02-28 08:29:30 +00:00
</template>
</template>
<template v-else-if="!doc.children && doc.component">
2024-04-24 22:43:32 +00:00
<component :is="{ ...doc.component }" :id="doc.id" :label="doc.label" :data="doc.data" :badge="doc.badge" :description="doc.description" />
2023-02-28 08:29:30 +00:00
</template>
</section>
</template>
</template>
<script>
export default {
props: ['docs']
};
</script>