小谢第55问:父子组件生命周期加载顺序

1、父子组件的加载顺序为

父beforeCreated ->父created ->父beforeMounted ->子beforeCreated ->子created ->子beforeMounted ->子mounted -> 父mounted

2、父组件更新顺序为

父beforeUpdate->父updated

3、子组件更新顺序为

父beforeUpdate->子beforeUpdate->子updated->父updated

4、父子组件销毁顺序为

父beforeDestroy->子beforeDestroy->子destroyed->父destroyed

原文地址:https://www.cnblogs.com/xieoxie3000question/p/13911707.html