步骤①:在vscode界面按F1,进入命令行,输入sinppets
步骤②:选vue进入自定义代码段(vue.json)

不想对自定义代码段里面的属性进行了解的同学可以直接复制以下这段代码到vue.json

{
  "Print to console": {
    "prefix": "vue",
    "body": [
      "<template>",
      "",
      "</template>",
      "",
      "<script type='text/ecmascript-6'>",
      "  export default {",
      "    data () {",
      "      return {",
      "      }",
      "    }",
      "  }",
      "</script>",
      "",
      "<style lang='scss' scoped='' type='text/css'>",
      "",
      "</style>"    
    ],
  "description": "Log output to console"
  }
}

对于自定义代码段相关属性,想了解的同学可以参考这篇文章:
http://blog.csdn.net/maokelong95/article/details/54379046

步骤③:在*.vue文件输入vue回车即可(自定义代码段出现)

Logo

前往低代码交流专区

更多推荐