primevue-mirror/components/doc/DocSections.vue

27 lines
1011 B
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">
2023-10-06 17:23:12 +00:00
<section class="py-4">
2023-02-28 08:29:30 +00:00
<template v-if="doc.children">
<div :id="doc.id">
<DocSectionText :id="doc.id" :label="doc.label">
<p v-if="doc.description">{{ doc.description }}</p>
2023-02-28 08:29:30 +00:00
</DocSectionText>
</div>
<template v-for="comp of doc.children" :key="comp.label">
2023-03-06 10:59:56 +00:00
<component :is="{ ...comp.component }" :id="comp.id" :label="comp.label" :data="comp.data" :description="comp.description" :level="2" />
2023-02-28 08:29:30 +00:00
</template>
</template>
<template v-else-if="!doc.children && doc.component">
<component :is="{ ...doc.component }" :id="doc.id" :label="doc.label" :data="doc.data" :description="doc.description" />
2023-02-28 08:29:30 +00:00
</template>
</section>
</template>
</template>
<script>
export default {
props: ['docs']
};
</script>