快速生成Vue2模板

1.点击文件,再点击首选项,然后选择用户片段;

 

2.在弹出来的输入框中,选择第一行vue.json或者第二行新建全局代码片段文件都可,都是为了打开vue.json文件;

 

 3.显示这种情况

 

 4.把下面代码复制到vue.json文件里,然后保存。

{
    "Print to console": {
    "prefix": "vue",
    "body": [
        "<template>",
        "  <div>\n",
        "  </div>",
        "</template>",
        "<script>",
        "export default {",
        "  props: {},",
        "  data () {",
        "    return {",
        "    }",
        "  },",
        "  components: {},",
        "  watch: {},",
        "  computed: {},",
        "  created () {},",
        "  mounted () {},",
        "  methods: {},",
        "}",
        "</script>",
        "<style lang=\"scss\" scoped>\n",
        "</style>",
        "$2"
    ],
    "description": "Log output to console"
}
}

 

posted @ 2022-12-08 13:18  黑白棋学弟  阅读(307)  评论(0编辑  收藏  举报