vue.js 全局組件學習筆記

用法:javascript 註冊或獲取全局組件。 html // 註冊組件,傳入一個擴展過的構造器 Vue.component('my-component', Vue.extend({ /* ... */ })) // 註冊組件,傳入一個選項對象 (自動調用 Vue.extend) Vue.component('my-component', { /* ... */ }) // 獲取註冊的組件
相關文章
相關標籤/搜索