vue 是一套前端框架,支援樣板、資料綁定,容量小,速度快,在 todo mvc branchmark 上面的測試報告來看甚至比 react or angular 還要快。
由上一篇文章,我們製作出了第一個 Vue.js 專案,現在我們就來介紹 Vue 的 component 長怎樣
首先我們打開專案資料夾的檔案 test_project/src/components/Hello.vue
test_project/src/components/Hello.vue
<template> <div class="hello"> <h1>{{ msg }}</h1> </div></template>
在學習 Vue.js 之前,我會先建議安裝 Vue Command line 套件 這個套件可以幫助我們快速建立 Vue.js的專案,首先我們來查詢看看可以開起哪種專案類型,輸入 vue list
vue list