vue生命周期详解
一、vue的生命周期
创建前:beforeCreate, 创建后:created
挂载前:beforeMount, 挂载后:mounted
更新前:beforeUpdate, 更新后:updated
销毁前:beforeDestroy, 销毁后:destroyed
DOM渲染在哪个周期中就已经完成 : mounted
-----使用了 keep-alive 就会多2个生命周期:
activated
deactivated
二、生命周期的理解
总共分为:8个阶段
创建前/后:
beforeCrea
原创
2020-07-12 05:43:54 ·
299 阅读 ·
0 评论