Visual Studio Code自动生成vue开发模板
在使用vs开发vue中经常新建vue文件进行模块开发,新建文件结构着实痛苦于是百度配置一下自己的vs编辑器:1.点击vs左下角设置选择用户代码片段2.输入vue并按下回车,将下边代码复制粘贴到vue.json进行保存{"Print to console": {"prefix": "vue","body": ["<template>",...
·
在使用vs开发vue中经常新建vue文件进行模块开发,新建文件结构着实痛苦
于是百度配置一下自己的vs编辑器:
1.点击vs左下角设置选择用户代码片段
2.输入vue并按下回车,将下边代码复制粘贴到vue.json进行保存
{
"Print to console": {
"prefix": "vue",
"body": [
"<template>",
" <div>",
" $0",
" </div>",
"</template>",
"",
"<script>",
"",
" export default {",
" name:'',",
" props:[''],",
" data () {",
" return {",
"",
" };",
" },",
"",
" components: {},",
"",
" computed: {},",
"",
" beforeMount() {},",
"",
" mounted() {},",
"",
" methods: {},",
"",
" watch: {}",
"",
" }",
"",
"</script>",
"<style lang='' scoped>",
"",
"</style>"
],
"description": "Log output to console"
}
}
然后在新建的vue文件中输入vue按下回车,即可
更多推荐
已为社区贡献10条内容
所有评论(0)