组件用.vue还是.js
提案文件 (propdoc)
quick and easy documentation of Vue.js components.
快速简便的Vue.js组件文档。
A single component that provides simple documentation of Vue.js components/props.
提供Vue.js组件/属性的简单文档的单个组件。
安装 (installation)
npm install --save propdoc
示例输出 (example output)
This example was solely generated based on the extra fields described below.
本示例仅基于以下所述的额外字段生成。
特征 (Features)
propdoc proposes a new way of documenting Vue components, by including some (or all) of the documentation in the component itself.
propdoc通过在组件本身中包含部分(或全部)文档,提出了一种记录Vue组件的新方法。
优点: (Benefits:)
props can be directly annotated, making documentation essentially the same as commenting a prop Documentation can live directly in the component - thus centralizing the documentation and hopefully helping the development/documentation cycle
可以直接注释道具,使文档与注释道具基本相同。文档可以直接存在于组件中-从而集中了文档,并有望帮助开发/文档开发周期
缺点: (Downsides:)
If all documentation is built into the options object, the component will use additional space This can be mitigated by externalizing the larger proposed keys such as description and token
如果所有文档都内置在options对象中,则组件将使用额外的空间,这可以通过外部化较大的建议键(例如description和token)来减轻。
翻译自: https://vuejsexamples.com/a-single-component-that-provides-simple-documentation-of-vue-js/
组件用.vue还是.js