1.安装插件:Vue 3 Snippets
2.vsCode打开:
文件-->首选项-->用户代码片段-->vue.json
3.vue.json
设置
粘入即可
{
"Print to console": {
"prefix": "vue",
"body": [
"<template>",
" <div></div>",
"</template>",
"",
"<script>",
"export default {",
"}",
"",
"</script>",
"",
"<style lang='stylus' scoped>",
"",
"</style>",
""
],
"description": "Log output to console"
}
}
prefix 是用来触发代码段的内容,即是使用模板的快捷入口
body 是模板所需的代码。
description 是代码段描述