vscode設置vue代碼片斷

1、如何設置?css

  1. 打開用戶片斷

    clipboard.png

  2. 選擇或建立vue.json代碼片斷

    clipboard.png

  3. 粘貼下面代碼片斷便可vue

    {
        "Print to console": {
            "prefix": "vue",
            "body": [
                "<template>",
                "    <div>\n",
                "    </div>",
                "</template>\n",
                "<script>",
                "export default {",
                "    props: {\n",
                "    },",
                "    data() {",
                "        return {\n",
                "        };",
                "    },",
                "    computed: {\n",
                "    },",
                "    created() {\n",
                "    },",
                "    mounted() {\n",
                "    },",
                "    watch: {\n",
                "    },",
                "    methods: {\n",
                "    },",
                "    components: {\n",
                "    },",
                "};",
                "</script>\n",
                "<style scoped lang=\"${1:scss}\">\n",
                "</style>\n",
            ],
            "description": "Create vue template"
        }
    }

2、如何使用?json

新建*.vue文件,輸入vue,按tab便可spa

相關文章
相關標籤/搜索