vue中父子组件渲染,子组件更新,至父组件销毁的生命周期钩子函数触发顺序:
beforecreate(父)=> created(父)=> beforemount(父)=> beforecreate(子)=> created(子)=> beforemount(子)=> mounted(子)=> mounted(父)=> beforeUpdate(父)=> beforeUpdate(子)=> updated(子)=> updated(父)=> beforeDestroy(父)=> beforeDestroy(子)=> destroyed(子)=> destroyed(父)
网友评论