ComponentEmits
ComponentEmits automatically extracts a Vue component's defineEmits definitions via nuxt-component-meta, generating an Emits documentation table in your Markdown that includes event names, parameter types, and descriptions, with no need to write event API documentation by hand. Use it together with ComponentProps and ComponentSlots.
Usage
Use the :component-emits syntax in your Markdown documentation:
| Event | Type |
|---|---|
change | any[] |
delete | any[] |
:component-emits{slug="TestApi"}
API
Props
| Prop | Default | Type |
|---|---|---|
slug | 路由路径的最后一段 | string获取组件事件的 slug 标识 |
Changelog
No recent changes
ComponentSlots
ComponentSlots automatically generates complete slot documentation for Vue components via nuxt-component-meta, displaying every slot's name, scoped variable types, and description in a single line of Markdown, greatly reducing the effort of writing API documentation by hand.
ComponentExample
ComponentExample embeds interactive Vue component examples in your documentation, rendering a live preview and displaying syntax-highlighted source code with collapsible support. It fetches example files registered at build time via useFetchComponentExample, significantly improving the readability and user experience of your docs.