组件用.vue还是.js_一个组件,提供有关Vue.js的简单文档

组件用.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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值