vscode自动生成vue模板教程

vscode自动生成vue模板步骤

step1:
文件-首选项-用户代码片段,输入vue.,json,点击enter后进入vue.json文件,将下方代码完全覆盖掉以前内容,保存

step2:测试
新进test.vue文件,在vue文件中输入vue,点击enter就能自动生成模板了,如果想调整模板内容,在vue.json中修改

{
"Print to console": {

    "prefix": "vv",

    "body": [

    "<template>",

    " <div>$0</div>",

    "</template>",

    "",

    "<script>",

    "export default {",

    "  data () {",

    "    return {",

    "    }",

    "  }",
    "}",

    "",

    "</script>",

    "<style scoped>",

    "</style>",

    "",
],

    "description": "Log output to console"
    }
}

猜你喜欢

转载自blog.csdn.net/weixin_37901545/article/details/81984753
今日推荐