Amare's blog
  • 《Vue》笔记
  • 组件
xugaoyi
2020-02-18

vue父子组件的生命周期顺序

# vue父子组件的生命周期顺序

# 加载渲染过程

父beforeCreate -> 父created-> 父beforeMount-> 子beforeCreate -> 子created -> 子beforeMount -> 子mounted -> 父mounted
1

父组件会先执行到beforeMount,接着会执行子组件钩子到挂载结束,再挂载父组件。

# 子组件更新过程

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

# 父组件更新过程

父beforeUpdate -> 父updated
1

# 销毁过程

父beforeDestroy -> 子beforeDestroy -> 子destroyed -> 父destroyed
1
#Vue
Last Updated: 2021/03/25, 20:24:44
最近更新
01
使用State Hook
04-06
02
使用Effect Hook
04-06
03
Hook规则
04-06
更多文章>
Theme by Vdoing | Copyright © 2021-2021 Amare | MIT License | 宁ICP备2021002173号-1
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式