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

},

}

相关推荐
lichenyang4533 分钟前
ASCF WebView:H5 为什么收不到元服务消息?
前端
莪_幻尘9 分钟前
从 0 到 1 搭建你的 AI Agent 平台:当 Agent 有了工厂,人人都能造同事
前端·ai编程
yuzhiboyouye30 分钟前
XML写接口适用场景举例
java·服务器·前端
IMPYLH32 分钟前
HTML 的 <slot> 元素
前端·网络·html
计算机魔术师41 分钟前
AI行业周末炸锅:有人要踩刹车,有人嫌你刹车片太厚
前端
yuzhiboyouye1 小时前
零sql和xml写接口,的区别是什么,过程是什么,举例一下下,用mybatis-plus+ spring-boot
java·服务器·前端
怕浪猫1 小时前
构建你自己的 AI Agent 发行版:从 Profile 定制到生产部署全流程
前端·后端·面试
深圳市益普科技有限公司1 小时前
半导体CIM数据底座:四步把多厂数据拉通
前端
乐迪绘防伪油墨技术分享2 小时前
特种功能油墨选型指南:温变 / 遇水 / 荧光 / UV LED 技术对比与供应商参考
前端·html·uv
cll_8692418912 小时前
WordPress Single Post 文章页美化:响应式表格、图片优化与自动悬浮 Table of Contents(CSS + JS)
前端·css