相關推薦:《》
修改位置
開啟vscode偏好設定-使用者片段,可以搜尋已有的檔名,或者新建一個json檔案。
建立自定義模版
{ "Print to console": { "prefix": "ybase", "body": [ "<template>", " <div>", " <!-- Page -->", " </div>", "</template>", "<script lang=\"ts\">", "import { Vue, Component } from \"vue-property-decorator\";", "", "@Component({})", "export default class NAME extends Vue {", " // component", "}", "</script>", "<style lang=\"scss\">", "// style", "</style>", "" ], "description": "YBASE" } }
使用方法
以上我建立的是快速建立vue檔案模版。
新建頁面後,通過設定的快捷指令「ybase」即可快速生成頁面程式碼。
更多程式設計相關知識,請存取:!!
以上就是使用VSCode快速建立vue檔案模版的方法介紹的詳細內容,更多請關注TW511.COM其它相關文章!