// vue2 ——> vue3
beforeCreate —> use setup()
created —> use setup()
beforeMount —> onBeforeMount
mounted —> onMounted
beforeUpdate —> onBeforeUpdate
updated —> onUpdated
beforeDestroy —> onBeforeUnmount
destroyed —> onUnmounted
activated —> onActivated
deactivated —> onActivated
deactivated —> onDeactivated
errCaptured —> onErrorCaptured
// vue3 调试函数
onRenderTracked
onRenderTriggered
Vue——vue2与vue3生命周期对比及vue3调试函数
最新推荐文章于 2023-02-01 17:33:12 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)