一、父子组件
image.png所以:
父beforeCreate > 父created > 父beforeMount > 子beforeCreate > 子created > 子beforeMount > 子mounted > 父mounted
二、属性状态 [官方源码链接]
image.png所以:
props - > methods - > data - > computed - > watch
三、生命周期 + 属性状态
beforeCreate > props - > methods - > data - > computed - > watch > created > beforeMount > mounted
网友评论