mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
Co-authored-by: Pooya Parsa <pooya@pi0.io> Co-authored-by: Florent Delerue <florentdelerue@hotmail.com> Co-authored-by: Sébastien Chopin <seb@nuxt.com>
25 lines
495 B
Vue
25 lines
495 B
Vue
<template>
|
|
<div>
|
|
<FieldGroup>
|
|
<Field v-for="slot in meta?.meta.slots" :key="slot.name" v-bind="slot" />
|
|
</FieldGroup>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { upperFirst, camelCase } from 'scule'
|
|
|
|
const props = defineProps({
|
|
slug: {
|
|
type: String,
|
|
default: null
|
|
}
|
|
})
|
|
|
|
const route = useRoute()
|
|
|
|
const name = props.slug || `U${upperFirst(camelCase(route.params.slug[route.params.slug.length - 1]))}`
|
|
|
|
const meta = await fetchComponentMeta(name)
|
|
</script>
|