对于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"

},

}

相关推荐
上官熊猫21 分钟前
nuxt3项目打包部署到服务器后配置端口号和开启https
前端·vue3·nuxt3
dal118网工任子仪2 小时前
61,【1】BUUCTF WEB BUU XSS COURSE 11
前端·数据库·xss
约定Da于配置4 小时前
uniapp封装websocket
前端·javascript·vue.js·websocket·网络协议·学习·uni-app
山楂树の4 小时前
xr-frame 模型摆放与手势控制,支持缩放旋转
前端·xr·图形渲染
大叔_爱编程4 小时前
wx030基于springboot+vue+uniapp的养老院系统小程序
vue.js·spring boot·小程序·uni-app·毕业设计·源码·课程设计
LBJ辉5 小时前
1. 小众但非常实用的 CSS 属性
前端·css
milk_yan5 小时前
Docker集成onlyoffice实现预览功能
前端·笔记·docker
计算机学姐6 小时前
基于微信小程序的驾校预约小程序
java·vue.js·spring boot·后端·spring·微信小程序·小程序
村口蹲点的阿三6 小时前
Spark SQL 中对 Map 类型的操作函数
javascript·数据库·hive·sql·spark
m0_748255027 小时前
头歌答案--爬虫实战
java·前端·爬虫