vscode中怎么快速创建vue模板文件
解决问题:怎么实现在vscode中快速创建vue的模板文件
材料:vscode软件
步骤:文件—首选项—用户代码片段
1.在出现的输入框中输入vue回车打开vue.json文件
2.将下面的代码复制到vue.json文件中保存
1 {
2 "Print to console": {
3 "prefix": "vue",
4 "body": [
5 "<!-- $0 -->",
6 "<template>",
7 " <div></div>",
8 "</template>",
9 "",
10 "<script>",
11 "export default {",
12 " data () {",
13 " return {",
14 " };",
15 " },",
16 "",
17 " components: {},",
18 "",
19 " computed: {},",
20 "",
21 " mounted: {},",
22 "",
23 " methods: {}",
24 "}",
25 "",
26 "</script>",
27 "<style lang='scss' scoped>",
28 "</style>"
29 ],
30 "description": "Log output to console"
31 }
32 }
3.新建一个vue文件后在文件中输入vue回车,完成快速建立。