vue生命周期

Vue实例是一个完整的生命周期,即从开始创建,初始化数据,编译模板,挂载DOM,渲染更新,渲染卸载的过程,成为生命周期。
创建
beforeCreate 
created


添加
beforeMount
mounted (在这里进行数据请求)


更新
beforeUpdate
updated


激活(动态切换的时候会触发)
activated
deactivated


销毁  (主动销毁this.$destroy())
beforeDestroy   
destroyed

猜你喜欢

转载自blog.csdn.net/zhanghuanhuan1/article/details/77864063