vue性能優化之函數式組件

函數式組件 1.特色 沒有this(沒有實例) 沒有響應式數據 它只是一個接受一些 prop 的函數。 Vue.component('my-component', { functional: true, // Props 是可選的 props: { // ... }, // 爲了彌補缺乏的實例 // 提供第二個參數做爲上下文 render: function (
相關文章
相關標籤/搜索