這篇文章給大家分享的是有關(guān)使用VSCode搭建vue模板的示例的內(nèi)容。小編覺(jué)得挺實(shí)用的,因此分享給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧。
創(chuàng)新互聯(lián)主營(yíng)西安網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營(yíng)網(wǎng)站建設(shè)方案,APP應(yīng)用開(kāi)發(fā),西安h5小程序設(shè)計(jì)搭建,西安網(wǎng)站營(yíng)銷(xiāo)推廣歡迎西安等地區(qū)企業(yè)咨詢(xún)VSCode快速搭建vue模板
文件 -> 選項(xiàng) -> 用戶(hù)代碼片段
搜索vue
vue2.x添加下方代碼
{ "Print to console": { "prefix": "vue", "body": [ "<!-- $0 -->", "<template>", " <div></div>", "</template>", "", "<script>", "export default {", " data () {", " return {", " };", " },", "", " components: {},", "", " computed: {},", "", " mounted: {},", "", " methods: {}", "}", "", "</script>", "<style scoped>", "</style>" ], "description": "Log output to console" } }
vue3.x添加下方代碼
{ "Print to console": { "prefix": "vue3", "body": [ "<!-- $0 -->", "<template>", " <div></div>", "</template>", "", "<script>", "import { computed, reactive, ref, watch, onMounted,onUpdate,onUnmounted} from 'vue';", "export default {", "setup(){", "//類(lèi)mounted", "onMounted(()=>{", "", "})", "//相當(dāng)于updated", "onUpdate(()=>{", "", "})", "//相當(dāng)于destroyen", "onUnmounted(()=>{", "", "})", "return {}", "}", "}", "", "</script>", "<style scoped>", "</style>" ], "description": "Log output to console" } }
新建.vue文件后:
感謝各位的閱讀!關(guān)于使用VSCode搭建vue模板的示例就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,讓大家可以學(xué)到更多知識(shí)。如果覺(jué)得文章不錯(cuò),可以把它分享出去讓更多的人看到吧!
文章題目:使用VSCode搭建vue模板的示例-創(chuàng)新互聯(lián)
當(dāng)前鏈接:http://aaarwkj.com/article2/hogic.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供電子商務(wù)、定制網(wǎng)站、手機(jī)網(wǎng)站建設(shè)、建站公司、外貿(mào)建站、自適應(yīng)網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容