Vue自定義全局組件install的實現

這裏寫自定義目錄標題 Vue自定義全局組件install的實現 Vue自定義全局組件install的實現 在一些Vue的開源組件中咱們經常會看到一個install()方法來註冊全局組件,而它的實現方式實際上是很是簡單的。 1.首先創建一個公用的組件。vue // Cmponent.vue 公用的組件 <template> <div>我是組件</div> </template> <scr
相關文章
相關標籤/搜索