mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
36 lines
748 B
Vue
36 lines
748 B
Vue
<template>
|
|
<div>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Slot</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr v-for="slot in (meta.meta.slots as any[])" :key="slot.name">
|
|
<td class="whitespace-nowrap">
|
|
<code>{{ slot.name }}</code>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
const props = defineProps({
|
|
slug: {
|
|
type: String,
|
|
default: null
|
|
}
|
|
})
|
|
|
|
const route = useRoute()
|
|
// eslint-disable-next-line vue/no-dupe-keys
|
|
const slug = props.slug || route.params.slug[route.params.slug.length - 1]
|
|
const camelName = useCamelCase(slug)
|
|
const name = `U${useUpperFirst(camelName)}`
|
|
|
|
const meta = await fetchComponentMeta(name)
|
|
</script>
|