1.左下角设置
2.
3.
4.
//vue2模板
"Print to console": {
"prefix": "v2",
"body": [
"<template>",
" <div>$1</div>",
"</template>",
"",
"<script>",
"export default {",
" name: '',",
" components: {},",
" data () {",
" return {",
" }",
" },",
" created () {},",
" mounted () {},",
" methods: {},",
" computed: {}",
"}",
"</script>",
"<style scoped>",
"</style>",
""
],
"description": "Log output to console"
}
//vue3模板
"vue3 template": {
"prefix": "v3",
"body": [
"<template>",
" <div>$1</div>",
"</template>",
"",
"<script setup lang=\"ts\">",
"$2",
"</script>",
"",
"<style lang=\"less\" scoped>",
"$3",
"</style>"
],
"description": "vue3基础模板"
}
//打印模板
"Print to console": {
"prefix": "cons",
"body": [
"console.log('@@@',$1);",
],
"description": "Arrow Function"
}
//箭头函数模板1
"箭头函数": {
"prefix": "dff",
"body": [
"const $1 =($2) => {$3}"
],
"description": "Arrow Function" }
//箭头函数模板2
"箭头函数": {
"prefix": "dfd",
"body": [
"() => {$1}"
],
"description": "Arrow Function"
}