安裝Vetur插件
code-首選下-用戶代碼片段-新建全局代碼片段-在輸入框中新建名稱為vue.json
刪除json文件內容,把下面的內容復制粘貼上
{
"Print to console": {
"prefix": "vue",
"body": [
"<!-- $0 -->",
"<template>",
" <div></div>",
"</template>",
"",
"<script>",
"export default {",
" data () {",
" return {",
" }",
" },",
" components:{",
" }",
"}",
"",
"</script>",
"",
"<style lang='scss' scoped>",
"",
"</style>",
""
],
"description": "Log output to console"
}
}
在頁面中輸入vue按tab鍵就出來了