怎样运用vscode疾速新建vue模版

  1. 文件 ==> 首选项 ==> 用户代码片断 ==> 输入 vue 然后回车
  2. 增加设置,让vscode许可自定义的代码片断提醒出来
 
{
    "Print to console": {
        "prefix": "vue",
        "body": [
            "<template>",
            "  <div>",
            "    $0",
            "  </div>",
            "</template>",
            "",
            "<script>",
            "",
            "  export default {",
            "    name:'',",
            "    props:[''],",
            "    data () {",
            "      return {",
            "",
            "      };",
            "    },",
            "",
            "    components: {},",
            "",
            "    computed: {},",
            "",
            "    beforeMount() {},",
            "",
            "    mounted() {},",
            "",
            "    methods: {},",
            "",
            "    watch: {}",
            "",
            "  }",
            "",
            "</script>",
            "<style lang='' scoped>",
            "",
            "</style>"
        ],
        "description": "Log output to console"
    }
}
  1. 测试要领: 新建vue后缀文件,输入vue,按下tab键,OK
    原文作者:葛小友
    原文地址: https://segmentfault.com/a/1190000019084920
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞