mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
38 lines
865 B
Vue
38 lines
865 B
Vue
<script setup lang="ts">
|
|
import { upperFirst, camelCase } from 'scule'
|
|
|
|
const route = useRoute()
|
|
|
|
const camelName = camelCase(route.params.slug?.[route.params.slug.length - 1] ?? '')
|
|
const name = `U${upperFirst(camelName)}`
|
|
|
|
const meta = await fetchComponentMeta(name as any)
|
|
</script>
|
|
|
|
<template>
|
|
<ProseTable>
|
|
<ProseThead>
|
|
<ProseTr>
|
|
<ProseTh>
|
|
Event
|
|
</ProseTh>
|
|
<ProseTh>
|
|
Type
|
|
</ProseTh>
|
|
</ProseTr>
|
|
</ProseThead>
|
|
<ProseTbody>
|
|
<ProseTr v-for="event in meta.meta.events" :key="event.name">
|
|
<ProseTd>
|
|
<ProseCodeInline>
|
|
{{ event.name }}
|
|
</ProseCodeInline>
|
|
</ProseTd>
|
|
<ProseTd>
|
|
<HighlightInlineType v-if="event.type" :type="event.type" />
|
|
</ProseTd>
|
|
</ProseTr>
|
|
</ProseTbody>
|
|
</ProseTable>
|
|
</template>
|