vscode vue add code snippet
#Step 1: Enter the main interface of vs code –> use the shortcut key "ctrl + shift + p":
If the option Configure User Snippets does not appear on the first line, then you can enter: Configure User Snippets in the search bar, and then you can find this option.
#The second step selects or creates vue.json
#Step 3: Configure the code
"Print to console": {
"prefix": "vue",
"body": [
"<template>",
" <div>",
" </div>",
"</template>",
"",
"<script>",
" export default {",
" data() {",
" return {",
"",
" };",
" },",
" created() {",
"",
" },",
" mounted() {",
"",
" },",
" methods: {",
"",
" },",
"}",
"</script>",
"",
"<style lang='scss' scoped>",
"$4",
"</style>"
],
"description": "Log output to console"
}