VsCode uses koroFileHeader to configure author information and function comments

1. Install the koroFileHeader plug-in

Insert image description here

2. Configure settings.json file

Settings in the lower left corner—>Settings—>Enter @ext:obkoro1.korofileheader–>Open the settings.json file.
Insert image description here
After opening the file:
Modify the information you want
Insert image description here

{
    
    
    "fileheader.customMade": {
    
     // 此为头部注释     
        "Author": "xx", // 文件作者
        "Date": "Do not edit", // 文件创建时间
        "LastEditors": "Do not edit", // 最后编辑文件的人
        "LastEditTime": "Do not edit", // 文件最后编辑时间
        "Description": "", // 文件描述
        "FilePath": "Do not edit", // 文件在项目中的相对路径 自动更新  
    },
    "fileheader.cursorMode": {
    
     //此为函数注释
        "description":"", // 功能描述
        "param": "", // 传入参数
        "return": "", // 返回结果
        "author":"wuyue.nan" // 函数作者
    }
}

3. Implement the author’s annotation information in the file

快捷键:ctrl + win + i      // 生成头部注释
快捷键:ctrl + win + t      // 生成函数注释
<!--
 * @Author: xx
 * @Date: 2022-09-28 15:24:31
 * @LastEditors: Do not edit
 * @LastEditTime: 2022-11-08 09:56:16
 * @Description: www
 * @FilePath: \interface-data\src\views\systemconfig\index.vue
-->

/**
 * @description: www
 * @return {*}
 * @author: wuyue.nan
 */

Guess you like

Origin blog.csdn.net/wang13679201813/article/details/127744544