ComponentProps

了解如何使用 ComponentProps 组件自动为您的 Vue 组件生成属性(Props)文档,清晰地展示其名称、类型、默认值和详细说明。

用法

在您的 Markdown 文档中使用以下语法:

md
:component-props{slug="你的组件名称"}

API

Props

Prop Default Type
slugroute path's last segmentstring

The slug of the component to fetch props for.

ignore[ "activeClass", "inactiveClass", "exactActiveClass", "ariaCurrentValue", "href", "rel", "noRel", "prefetch", "prefetchOn", "noPrefetch", "prefetchedClass", "replace", "exact", "exactQuery", "exactHash", "external", "onClick", "viewTransition", "enterKeyHint", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget" ]string[]

An array of prop names to ignore.

proseboolean

Changelog

d68bc — feat: 增强组件属性显示功能

586a5 — ✨ feat: 添加 Nuxt 文档主题 layer 核心代码

Copyright © 2024 - 2026