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代码片段
猜你喜欢
- javascript 判断当前浏览器版本并判断ie版本 2023-08-08
- vue keep-alive 2023-10-08
- layui数据表格以及传数据方式 2022-12-13
- 1 Vue - 简介 2023-10-08
- 关于 html:如何从 css 表中删除边距和填充 2022-09-21
- jsPlumb+vue创建字段映射关系 2023-10-08
- 深入浅析AjaxFileUpload实现单个文件的 Ajax 文件上传库 2022-12-15
- 基于CORS实现WebApi Ajax 跨域请求解决方法 2023-02-14
- ajax实现输入提示效果 2023-02-14
- JS实现左侧菜单工具栏 2022-08-31