flex 组建重写
flex歷經(jīng)幾個版本的變化,其封裝性也越來越規(guī)范。
今日flex的學習,總結(jié)是組件的重寫。
項目中為使組件的針對性,易用性更強 ,免不了要重寫組件。
要改變你的對手你的了解你的對手。
一個組件從被new到渲染出來主要經(jīng)歷幾個重要事件,其順序為:
1.Constructor 2.creatChildren 3.commitProperties 4.measure 5.updateDisplayList
分別對其解讀:
constructor是構(gòu)造函數(shù),其作用不言而喻。
creatChildren是向重寫的組件中添加子組件。
constructor和creatChildren只執(zhí)行一次。constructor在事件preinitialize時被調(diào)用,creatChildren在initialize時被調(diào)用。
轉(zhuǎn)載于:https://www.cnblogs.com/tiandi/p/3440680.html
總結(jié)
- 上一篇: 怎么连接无线路由器 如何进无线路由器
- 下一篇: link路由器怎么升级 家里路由器如何升