vue 父子組件執行順序

vue 父子組件執行順序 vue

掛載 :
beforeCreate  (parent)
created (parent)
beforeMount  (parent)
beforeCreate  (child)
created (child)
beforeMount (child)
mounted (child)
mounted (parent)遞歸

父組件先開始掛載,掛載途中遇到子組件遞歸執行渲染流程,渲染

卸載:
beforeDestroy  (parent)
beforeDestroy (child)
Destroyed  (child)
Destroyed   (parent)date


更新: beforeUpdate  (parent)     bforeUpdate  (child)     updated  (child) updated  (parent)  

相關文章
相關標籤/搜索