- 点击 【文件】 – 【首选项】–【用户片段】
- 点击vue.json
- 自定义代码片段
{
"Print to console": {
"prefix": "vue",
"body": [
"<template>",
" <div>",
" $1",
" </div>",
"</template>\n",
"<script>",
"export default {",
" name: '$2',",
" data() {",
" return {\n",
" };",
" },",
"};",
"</script>\n",
"<style lang=\"${3:scss}\">\n",
"</style>\n",
],
"description": "Create vue template"
}
}
效果
按tab键可以定位到下一个光标