1. 程式人生 > 程式設計 >vsCode一鍵生成vue模板

vsCode一鍵生成vue模板

1.使用快捷Ctrl + Shift + P喚出控制檯

vsCode一鍵生成vue模板

2,然後輸入“snippets”並選擇

vsCode一鍵生成vue模板

2.接著輸入vue

vsCode一鍵生成vue模板

vs code自動生成vue.json檔案。

vsCode一鍵生成vue模板

3. 將vue.json檔案改為下面得模板(可以根據個人需求修改當中的模板內容)

{
      
        "Print to cwww.cppcns.comonsole": {
            "prefix": "vue","body": [
                "<template>","  <div">$0</div>",程式設計客棧              "</template>","","<script>","export default {",CtQTB
" components: {},",http://www.cppcns.com " props: {}," data() {"," return {"," };"," }," watch: {}," computed: {}," methods: {}," created() {}," mounted() {}","};","</script>","<style lang=\"scss\" scoped>","</style>" ],"description": "A vue file template" http://www.cppcns.com
} }

然後新建一個 vue 檔案,輸入“vue”,按下回車鍵或者Tab鍵,模板就自動生成了:

vsCode一鍵生成vue模板

到此這篇關於vsCode一鍵生成vue模板 的文章就介紹到這了,更多相關vsCode生成vue模板 內容請搜尋我們以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援我們!