1.点击文件 首选项 用户代码片段 2.新建或修改vue.json 3.将下列代码粘贴上去(可根据自己需要添加/删除){Print to console: {prefix: vue,body: [template, div\n, /div,/template...
1.点击文件 > 首选项 > 用户代码片段
2.新建或修改vue.json
3.将下列代码粘贴上去(可根据自己需要添加/删除)
{
"Print to console": {
"prefix": "vue",
"body": [
"<template>",
" <div>\n",
" </div>",
"</template>\n",
"<script>",
"export default {",
" name:\"\",",
" components: {},",
" props: {},",
" data() {",
" return {};",
" },",
" computed: {},",
" watch: {},",
" created() {},",
" mounted() {},",
" activited() {},",
" update() {},",
" filters: {},",
" methods: {},",
"};",
"</script>\n",
"<style lang=\"${1:scss}\" scoped>\n",
"</style>\n",
],
"description": "Create vue template"
}
}
4.在新建的vue文件里面打’vue’敲回车代码片就自动生成了
沃梦达教程
本文标题为:VsCode快速生成vue代码片段
基础教程推荐
猜你喜欢
- Ajax发送和接收请求 2022-12-15
- 在实战中可能碰到的几种ajax请求方法详解 2023-02-01
- 关于Ajax跨域问题及解决方案详析 2023-02-23
- Ajax+smarty技术实现无刷新分页 2022-12-15
- cocos creator游戏实现loading加载页面,游戏启动加载动画 2022-10-29
- uniapp开发微信小程序自定义顶部导航栏功能实例 2022-10-21
- JS滚动到顶部踩坑解决记录 2023-07-10
- Javascript Bootstrap的网格系统,导航栏和轮播详解 2023-08-11
- 使用ajax跨域调用springboot框架的api传输文件 2023-02-23
- HTML clearfix清除浮动讲解 2022-11-20