vscode 中配置 vetur

375 阅读1分钟

引用 www.jianshu.com/p/8610215a8…

实际用的

{
  "Print to console": {
  "prefix": "vueTpl",
  "body": [
  "<!-- 组件说明 -->",
  "<template>",
  "\t<div class=''>\n\t\t$2\n\t</div>",
  "</template>",
  "",
  "<script>",
  "\t//import x from ''",
  "\texport default {",
  "\t\tname:'',",
  "\t\tcomponents: {",
  "",
  "\t\t},",
  "\t\tdata () {",
  "\t\t\treturn {",
  "",
  "\t\t\t};",
  "\t\t},",
  "\t\tcomputed: {",
  "",
  "\t\t},",
  "\t\tmethods: {",
  "",
  "\t\t},",
  // "mounted() {",
  // "",
  // "},",
  //"beforeCreate() {}, //生命周期 - 创建之前",
  //"beforeMount() {}, //生命周期 - 挂载之前",
  //"beforeUpdate() {}, //生命周期 - 更新之前",
  //"updated() {}, //生命周期 - 更新之后",
  //"beforeDestroy() {}, //生命周期 - 销毁之前",
  //"destroyed() {}, //生命周期 - 销毁完成",
  // "activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发",
  "\t}",
  "</script>",
  "",
  "<style  scoped>",
  "",
  "</style>"
  ],
  "description": "tplv output to vue-template"
  }
  }