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] 2. Vue 的实例生命周期 #393

Open
qiilee opened this issue Oct 8, 2019 · 1 comment
Open

[vue] 2. Vue 的实例生命周期 #393

qiilee opened this issue Oct 8, 2019 · 1 comment
Labels

Comments

@qiilee
Copy link
Member

qiilee commented Oct 8, 2019

答案:

vue_002

(1) beforeCreate 初始化实例后 数据观测和事件配置之前调用

(2) created 实例创建完成后调用

(3) beforeMount 挂载开始前被用

(4) mounted el 被新建 vm.$el 替换并挂在到实例上之后调用

(5) beforeUpdate 数据更新时调用

(6) updated 数据更改导致的 DOM 重新渲染后调用

(7) beforeDestory 实例被销毁前调用

(8) destroyed 实例销毁后调用

@qiilee qiilee added the VUE label Oct 8, 2019
@Yuaao
Copy link

Yuaao commented Jan 8, 2020

activated 被keep-alive缓存的组件激活调用
deactivated 被keep-alive缓存的组件停用时的调用
errorCaptured 当捕获一个来自子孙组件的错误时候被调用

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

No branches or pull requests

2 participants