1.设置
2.点击“用户代码片段”
3.点击“新建代码段”
4.给代码段起名字
5.其中 scopre
一项设置为 html
或者 '',表示在 html
中或者所有语言中都可以通过输入 vue
生成代码段,如果设置为 javascript,typescript
则智能在 script
标签中才可以使用 vue
命令
"Print to console": {
"scope": "",
"prefix": "vue",
"body": [
"<!DOCTYPE html>"+
"<html lang=\"en\">"+
"<head>"+
"<meta charset=\"UTF-8\" />"+
"<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />"+
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />"+
"<title>Document</title>"+
"</head>"+
"<body>"+
"<div id=\"app\"></div>"+
"<script src=\"https://cdn.jsdelivr.net/npm/vue/dist/vue.js\"></script>"+
"<script>"+
"let app = new Vue({"+
"el: '#app',"+
"data: {},"+
"})"+
"</script>"+
"</body>"+
"</html>"
],
"description": "Log output to console"
}
}