進入文件、首選項、用戶片段

輸入框輸入vue,選擇vue.json

直接粘貼下行代碼
{
"Print to console": {
"prefix": "vue",
"body": [
"<template>",
" <div>\n",
" </div>",
"</template>",
"<script>",
"export default {",
" data() {",
" return {",
" }",
" },",
" activated() {",
" },",
" watch: {",
"},",
"created(){",
"},",
"mounted(){",
"},",
"methods:{",
"}",
"",
"",
"}",
"</script>",
"<style>",
"</style>",
"$2"
],
"description": "Log output to console"
}
}
新建空白vue文件輸入vue然后點擊tab鍵,收工:

