說說 Vue.js 組件

使用 Vue.js 組件,可以提高控件及其 JS 能力的可複用性。 1 定義第一個組件 Vue.js 組件需要註冊後纔可以使用,註冊分爲全局註冊和局部註冊。全局註冊後,任何 vue 實例都可以用這個組件。 html: <div id="app"> <deniro-component></deniro-component> </div> js: Vue.component('deniro-c
相關文章
相關標籤/搜索