vscode vue起始代码配置

文件-->首选项-->用户代码片段-->点击新建代码片段--取名vue.json 确定

{
    "Print to console": {
        "prefix": "vue",
        "body": [
            "<!-- $1 -->",
            "<template>",
            "<div class='$2'>$5</div>",
            "</template>",
            "",
            "<script>",
            "export default {",
            "components: {},",
            "data() {",
            "return {",
            "",
            "};",
            "},",
            "computed: {},",
            "watch: {},",
            "methods: {",
            "",
            "},",
            "created() {",
            "",
            "},",
            "mounted() {",
            "",
            "},",
            "}",
            "</script>",
            "<style  scoped>",
            "$4",
            "</style>"
        ],
        "description": "Log output to console"
    }
}

posted @ 2019-11-12 15:31  夏沫浅语  阅读(242)  评论(0编辑  收藏  举报