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
changeany[]
deleteany[]
:component-emits{slug="TestApi"}

API

Props

Prop Default Type
slug路由路径的最后一段string

获取组件事件的 slug 标识

Changelog

No recent changes
Copyright © 2024 - 2026