mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-26 18:00:43 +01:00
docs: rename Events to Emits
This commit is contained in:
37
docs/app/components/content/ComponentEmits.vue
Normal file
37
docs/app/components/content/ComponentEmits.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user