vscode加快开发速度的常用代码片段

在user snippets中的vue.json中配置常用的代码片段(持续更新中)

{
  "Print to console": {
    "prefix": "log",
    "body": ["console.log('$1');", "$2"],
    "description": "Log output to console"
  },
  "vue3 component": {
    "prefix": "vue3",
    "body": [
      "",
      "",
      "",
      ""
    ],
    "description": "vue3的代码片段"
  },
  "function comment": {
    "prefix": "funccomment",
    "body": [
      "/**",
      " * $1",
      " * $2",
      " *",
      " * @param  $3  $4  $5",
      " * @param  $6  $7  $8",
      " * @returns $9",
      " */"
    ],
    "description": "Add function comment"
  },
  "page comment": {
    "prefix": "pagecomment",
    "body": [
		"",
    ],
    "description": "Add function comment"
  },
  "vue2 component": {
	"prefix": "vue2",
	"body": [
	  "",
	  "",
	  "",
	  "",
	  ""
	]
  },
  "JavaScript If Statement": {
	"prefix": "if",
	"body": [
	  "if ($1) {",
	  "  $2",
	  "}"
	],
	"description": "JavaScript If Statement"
  }
  
}

你可能感兴趣的:(vscode,ide,编辑器)