1、文件-->首选项-->用户片段-->搜索vue-->点击vue.json

2、复制以下代码

{
    "Print to console": {
        "prefix": "vue",
        "body": [
            "<!-- $1 -->",
            "<template>",
            "<div class='page'>"
            "",
            "</div>",
            "</template>",
            "",
            "<script>",
            "export default {",
            "data() {",
            "return {",
            "",
            "};",
            "},",
            "mounted() {",
            "",
            "},",
            "methods: {",
            "",
            "},",
            "}",
            "</script>",
            "<style scoped>",
            "",
            "</style>"
        ],
        "description": "Log output to console"
    }
}
 
 
3、上面代码中的 “prefix”: “vue”, 就是快捷键;保存代码,新建vue结尾的文件,在空页面中输入vue,点击回车即可
posted on 2021-01-11 12:14  好大的虫子  阅读(1284)  评论(0编辑  收藏  举报