Open dashengzi66 opened 2 years ago
1.加载渲染过程 父beforeCreate->父created->父beforeMount->子beforeCreate->子created->子beforeMount->子mounted->父mounted
2.更新过程 父beforeUpdate->子beforeUpdate->子updated->父updated
3.销毁过程 父beforeDestroy->子beforeDestroy->子destroyed->父destroyed。
单个组件生命周期钩子执行顺序
页面加载:beforeCreate -> created -> beforeMount -> mounted 页面关闭:beforeDestroy -> destroyed 页面数据改变:beforeUpdate -> updated