vue父子组件生命周期执行顺序

vue

Parent
-- Child1
-- Child2

装载

parent beforeCreate
parent created
parent beforeMount
child1 beforeCreate
child1 created
chidl1 beforeMount
child2 brforeCreate
child2 created
child2 beforeMount
child1 mounted
child2 mounted
parent mounted

更新

parent beforeUpdate
child1 beforeUpdate
child2 beforeUpdate
child1 updated
child2 updated
parent updated

销毁

parent beforeDestory
child1 beforeDestory
child2 beforeDestory
child1 destoryed
child2 destoryed
parent destoryed

以上是 vue父子组件生命周期执行顺序 的全部内容, 来源链接: utcz.com/z/380010.html

回到顶部