1.首次加载过程:父beforeCreate -> 父created -> 父beforeMount -> 子beforeCreate -> 子created -> 子beforeMount ->子mounted -> (子activated) -> 父mounted
2.父组件更新过程:父beforeUpdate -> (子deactivated) -> 父updated
3.子组件更新过程:父beforeUpdate -> 子beforeUpdate -> 子updated -> 父updated
4.销毁过程:父beforeDestroy-> 子beforeDestroy -> 子destroyed -> 父destroyed
Vue 的父组件和子组件生命周期钩子执行顺序是什么?
最新推荐文章于 2024-03-24 22:42:29 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)