vue2 和 vue3 vscode 用户代码片段配置,个人编辑版本 {"Print to console":{"prefix":"vue2","body":["<!-- $1 -->","<template>"," $5","</template>","","","// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)","// 例如:import 《组件名称》 from '《...
1.不使用setup语法糖的模板 vue3-default.png {"Print to console":{"prefix":"vue3-default","body":["<template>"," "," $Index"," ","</template>","","","import {defineComponent} from \"vue\"","","export default defineComponent({","name: \"$Index\",","setup(){}","})","...
配置方法:文件-首选项-配置用户代码片段-vue.json 注:不喜欢用可以不配置 {// Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and// description. The prefix is what is used to trigger the snippet and the body will be expanded and insert...