1、Beforecreate //数据(data)和模版都没有时
2、Created //初始化数据和事件
3、BeforeMount //加载模版,数据挂载到模版之前
4、Mounted //数据挂载模版后
数据更新后,重新绑定模版
5、Before update 当数据更新之后,未更新到模版前
6、Updated 模版更新后
销毁vue实例
7、beforeDestroy 销毁前
8、destroyed 销毁后
Vue生命周期详解
本文详细解析了Vue.js的生命周期,从创建到销毁的八个关键阶段,包括BeforeCreate、Created、BeforeMount、Mounted、BeforeUpdate、Updated、BeforeDestroy和Destroyed,帮助开发者深入理解Vue组件的运行机制。
1、Beforecreate //数据(data)和模版都没有时
2、Created //初始化数据和事件
3、BeforeMount //加载模版,数据挂载到模版之前
4、Mounted //数据挂载模版后
数据更新后,重新绑定模版
5、Before update 当数据更新之后,未更新到模版前
6、Updated 模版更新后
销毁vue实例
7、beforeDestroy 销毁前
8、destroyed 销毁后
13万+

被折叠的 条评论
为什么被折叠?