vue.js的組件使用過程分爲三個步驟:一、建立組件構造器; 二、註冊組件; 三、使用組件vue
組件同時也分爲全局組件與局部組件spa
一、全局組件code
二、局部組件component
注意:因爲 HTML 標籤不區分大小寫,因此在生成的標籤名都會轉換爲小寫。例如,當你的 template 爲 <MyComponent></MyComponent> 時,插入 DOM 後會被轉換爲 <mycomponent></mycomponent>。blog
template
<MyComponent></MyComponent>
<mycomponent></mycomponent>