对于vsc中的vue命令 vue.json

打开vsc 然后在左下角有一个设置

2.点击用户代码片段

3.输入 vue.json回车

将此代码粘贴 (我的不一定都适合)

{

"vue2 template": {

"prefix": "v2",

"body": [

"<template>",

" <div>",

" $1",

" </div>",

"</template>",

"",

"<script>",

"export default {",

" data() {",

" return {",

" $2",

" };",

" },",

" methods: {},",

" computed: {},",

" components: {},",

" filters: {},",

" watch: {},",

" created() {},",

" mounted() {},",

"};",

"</script>",

"",

"<style lang=\"scss\" scoped>",

" $3",

"</style>"

],

"description": "vue2"

},

"vue3": {

"prefix": "v3",

"body": [

"<template>",

" $1",

"</template>",

"",

"<script setup>",

"import { ref, reactive } from \"vue\";",

"",

"</script>",

"",

"<style lang=\"${2:scss}\" ${3:scoped}></style>"

],

"description": "vue3"

},

"vue3 ts": {

"prefix": "v3-ts",

"body": [

"<template>",

" $1",

"</template>",

"",

"<script lang=\"ts\" setup>",

"import { ref, reactive } from \"vue\";",

"",

"</script>",

"",

"<style lang=\"${2:scss}\" ${3:scoped}></style>"

],

"description": "vue3 ts"

},

}

相关推荐
dr李四维3 分钟前
iOS构建版本以及Hbuilder打iOS的ipa包全流程
前端·笔记·ios·产品运营·产品经理·xcode
I_Am_Me_17 分钟前
【JavaEE进阶】 JavaScript
开发语言·javascript·ecmascript
雯0609~24 分钟前
网页F12:缓存的使用(设值、取值、删除)
前端·缓存
℘团子এ27 分钟前
vue3中如何上传文件到腾讯云的桶(cosbrowser)
前端·javascript·腾讯云
学习前端的小z33 分钟前
【前端】深入理解 JavaScript 逻辑运算符的优先级与短路求值机制
开发语言·前端·javascript
星星会笑滴36 分钟前
vue+node+Express+xlsx+emements-plus实现导入excel,并且将数据保存到数据库
vue.js·excel·express
前端百草阁1 小时前
【TS简单上手,快速入门教程】————适合零基础
javascript·typescript
彭世瑜1 小时前
ts: TypeScript跳过检查/忽略类型检查
前端·javascript·typescript
FØund4041 小时前
antd form.setFieldsValue问题总结
前端·react.js·typescript·html
Backstroke fish1 小时前
Token刷新机制
前端·javascript·vue.js·typescript·vue