在vscode的设置里面点击用户代码片段输入vue,打开vue.json复制下面代码进去
{ "Print to console": { "prefix": "vue", "body": [ "<template>", " <div>\n", " </div>", "</template>\n", "<style scoped lang=\"${1:scss}\">\n", "</style>\n", "<script>", "export default {", " props: {\n", " },", " data() {", " return {\n", " };", " },", " computed: {\n", " },", " created() {\n", " },", " mounted() {\n", " },", " watch: {\n", " },", " methods: {\n", " },", " components: {\n", " },", "};", "</script>\n", ], "description": "Create vue template" } }