New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@sl-theia/vis-plugin-apidoc

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sl-theia/vis-plugin-apidoc

vis 中使用通过api注释生成文档

latest
npmnpm
Version
0.0.3
Version published
Maintainers
2
Created
Source

@vises/vis-plugin-apidoc

A umi plugin

Install

pnpm i @sl-theia/vis-plugin-apidoc

Usage

Configure in .umirc.ts,

export default {
  plugins: [["@sl-theia/vis-plugin-apidoc"]],
};

使用

在 vis 创建项目中,src 下创建 api 文件夹,里面新建 api 文件

在每个文件头 // title: 页面描述 用作生成的文件名称

每个接口函数处使用注释

/**
 * @description 接口描述
 * @url {GET} api请求地址
 * @img https://img-blog.csdnimg.cn/img_convert/0548d4d186b025d0cbe6da3a38bfb20e.png  截图非必填
 * @param str {string}  - 必传参数
 * @param option {string}  - 必传参数
 * @param cb [string] - 可传参数
 * @returns name {string}  - 名字
 * @returns value {object[]}  - test
 * @returns value.name {string}  - 数组属性1
 * @returns value.num {number}  - 数组值1
 */
export const Test = () => {
  console.log("这是示例");
};

生成示例

Alt text

LICENSE

MIT

FAQs

Package last updated on 31 Jul 2023

Related posts