在vscode中文件——>首选项——>用户片段,输入名字按去确定,输入代码片段
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
{ "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>", " <script type=\"text/javascript\" src=\"https://unpkg.com/[email protected]/dist/vue.js\"></script>", "", "<body>", " <div id=\"app\">", "", " </div>", " <script>", " new Vue({", " el: '#app',", " data: {", " $1", " }", " })", " </script>", "</body>", "", "</html>", ], "description": "my vue template in html" } }View Code
标签:片段,vue,VSCode,代码,html,抽取 From: https://www.cnblogs.com/ZJ199012/p/17100935.html