ComponentEmits

GitHub查看源码
ComponentEmits 通过 nuxt-component-meta 自动提取 Vue 组件的 defineEmits 定义,在 Markdown 文档中生成包含事件名称、参数类型和说明的 Emits 文档表格,无需手动编写事件 API 说明,与 ComponentProps 和 ComponentSlots 配合使用。

用法

在您的 Markdown 文档中使用 :component-emits 语法:

Event Type
changeany[]
deleteany[]
:component-emits{slug="TestApi"}

API

Props

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

获取组件事件的 slug 标识

Changelog

No recent changes
Copyright © 2024 - 2026