1.使用快捷Ctrl + Shift + P喚出控制台,然后輸入snippets並選擇。(或 文件>首選項>用戶代碼片斷里面,輸入 vue.json ,然后回車 )(或 file > Preferences > User Snippets,然后回車)
2.接着輸入vue,選擇vue-html.json文件,把代碼粘貼上去
{ // Example: "Print to console": { "prefix": "vue", "body": [ "<template>", " <div class=\"wrapper\">$0</div>", "</template>", "", "<script>", "export default {", " components: {},", " props: {},", " data() {", " return {", " };", " },", " watch: {},", " computed: {},", " methods: {},", " created() {},", " mounted() {}", "};", "</script>", "<style lang=\"scss\" scoped>", ".wrapper{}", "</style>" ], "description": "A vue file template" } }