设置.vue 文件快速生成骨架:
1. 打开vscode,点击对话框左上角文件,依次点击:首选项 -> 配置用户代码片段;如下图
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/36d87729ffc5c9e24eef4853a968bc7a.png)
2. 输入框输入vue,选择vue.json;如下图
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/ae5bb411848c4ab788cadaa8664f22a4.png)
3.复制下面代码到 vue.json 文件并保存
{
"Print to console": {
"prefix": "vue",
"body": [
"<template>",
" <div class=\"\">\n",
" </div>",
"</template>\n",
"<script>",
"export default {",
" name: '',",
" props: {},",
" data () {",
" return {}",
" },",
" components: {",
" ",
" },",
" computed: {",
" ",
" },",
" mounted: {",
" ",
" },",
" watch: {",
" ",
" },",
" methods: {",
" ",
" },",
" created () {",
" ",
" },",
" mounted () {",
" ",
" },",
"}",
"</script>\n",
"<style scoped>",
" ",
"</style>",
"$2"
],
"description": "Log output to console"
}
}
4. 可以根据自己需求做出调整。