1.新建模板保存
打开“文件” —— “首选项”——“户代码片段”, 输入 vue
,选择 vue.json
==> 在vue.json文件里填入:
{
"Print to console": {
"prefix": "vue",
"body": [
"<template>",
" <div class=\"\">\n",
" </div>",
"</template>\n",
"<script>",
"export default {",
" name: '',",
" data() {",
" return {}",
" },",
" components: {}",
"}",
"</script>\n",
"<style>",
"</style>",
"$2"
],
"description": "Log output to console"
}
}
以上就算配置完成了。接下来是测试:
新建一个vue文件,输入“vue”,按下Enter键就能快速生成自己想要的模板了。