1、選擇“文件 -> 首選項 -> 用戶代碼片段”,此時,會彈出一個搜索框,輸入vue
選擇
vue
后,編輯器會自動打開一個名字為vue.json
的文件
2、復制以下內容到這個文件中:
{ "Print to console": { "prefix": "vue", "body": [ "<template>", " <div></div>", "</template>", "", "<script>", "export default {", " name: '',", " data () {", " return {", " ", " };", " },", " components: {},"," mounted () {},", " methods: {}", "}", "</script>", "", "<style lang='stylus' scoped>", "</style>" ], "description": "Log output to console" } }