• vscode前端代码注释模板使用介绍


    https://blog.csdn.net/hanwuqia0370/article/details/85777899?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-2

    添加注释

    1. ctrl+shift+p打开
    2. 输入snippets点击进入用户代码片段配置

    配置用户代码片段

      1. 配置css.json/css
        配置css.json/css
        进入之后输入
      2. {
            "Print to cssTitle": {
              "prefix": "cssNoteTitle",
              "body": [
                "/*",
                " *@description: ",
                " *@author: 查嘉磊 ",
                " *@date: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
                " *@version V1.0.5 ",
                "*/"
              ],
              "description": "Title对应css注释标题"
            },
            "Print to cssItem":{
              "prefix": "cssNoteItem",
              "body": [
                "/*",
                " *@description: ",
                " *@author: 查嘉磊 ",
                " *@date: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
                "*/"
              ],
              "description": "Item对应css类注释"
            }
          }

        用法:

      3. 在<style> </style>标签中间
        输入css会出现下面的选项
        

          

        Title对应css注释标题
        Item对应css类注释
        注意:使用sass或less等css语言需重新设置less.json和sass.json

        配置javascript.json/javascript

      4. {
          "Print to jsNoteTitle": {
            "prefix": "jsNoteTitle",
            "body": [
              "/*",
              " *@description:",
              " *@author: 韩武洽",
              " *@date: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
              " *@version: V1.0.5",
              "*/"
            ],
            "description": ""
          },
          "Print to jsfn": {
            "prefix": "jsfn",
            "body": [
              "/*",
              " *@functionName: ${TM_CURRENT_LINE}",
              " *@params1: ${1:参数1}",
              " *@params2: ${2:参数2}",
              " *@params3: ${3:参数3}",
              " *@params4: ${4:参数4}",
              " *@description:",
              " *@author: 韩武洽",
              " *@date: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
              " *@version: V1.0.5",
              "*/"
            ],
            "description": ""
          },
          "Print to jsModify": {
            "prefix": "jsModify",
            "body": [
              "/*",
              " *@description:",
              " *@modifyContent:",
              " *@author: 韩武洽",
              " *@date: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
              "*/"
            ],
            "description": ""
          },
          "Print to jsVariable": {
            "prefix": "jsVariable",
            "body": [
              "/*",
              " *@description:",
              " *@author: 韩武洽",
              " *@date: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
              " *@variable1: ${1:变量1}",
              " *@variable2: ${2:变量2}",
              " *@variable3: ${3:变量3}",
              " *@variable4: ${4:变量4}",
              " *@variable5: ${5:变量5}",
              "*/"
            ],
            "description": ""
          }
        }

        用法:用法和css类似在script标签内输入js出现提示

  • 相关阅读:
    接口隔离原则
    单一职责原则
    设计模式
    typora的快捷键构建
    typora的使用
    MapReuduce的一些情况
    Django之创建超级用户
    Tensorflow在python3.7版本的运行
    开启3个线程,这3个线程的ID分别为A、B、C,每个线程将自己的ID在屏幕上,要求输出结果必须按ABC的顺序显示:ABCABC
    VM10 win7 虚拟机+VS各种版本的快照...
  • 原文地址:https://www.cnblogs.com/annie211/p/12824026.html
Copyright © 2020-2023  润新知