Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lovelmh13 opened this issue Jun 24, 2021 · 0 comments
Open

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

lovelmh13 opened this issue Jun 24, 2021 · 0 comments

Comments

@lovelmh13
Copy link
Owner

image

加载渲染过程

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

代码更新过程

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

代码销毁过程

父beforeDestroy->子beforeDestroy->子destroyed->父destroyed

单一组件的执行顺序

beforeCreate
created
beforeMount
mounted
beforeUpdate
updated
activated
deactivated
beforeDestroy
destroyed
errorCaptured

activated, deactivated 是组件keep-alive时独有的钩子

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant