一、在官方下载并安装【VSCode】
官方下载:Visual Studio Code
二、打开【VSCode】,下载方便【Vue】开发的插件
图 1 【VSCode】插件三、代码片段抽取
1. 抽取vue中的代码片段
代码片段抽取 新建全局代码片段文件... 输入并回车 在该test.code-snippets里修改内容修改后 输入vuehtml回车 代码片段抽取成功{
"vue htm": {
"scope": "html",
"prefix": "vuehtml",
"body": [
"<!DOCTYPE html>",
"<html lang=\"en\">",
"",
"<head>",
" <meta charset=\"UTF-8\">",
" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">",
" <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">",
" <title>Document</title>",
"</head>",
"",
"<body>",
" <div id=\"app\">",
"",
" </div>",
" <script src=\"vue.min.js\"></script>",
" <script>",
" new Vue({",
" el: '#app',",
" data: {",
" $1",
" }",
" })",
" </script>",
"</body>",
"",
"</html>",
],
"description": "my vue template in html"
}
}
网友评论