Vue生命周期钩子对比
2023-05-31 10:59:21 0 举报
清晰明了的展示了Vue2和Vue3的生命周期的区别,可以帮助开发者更好地理解Vue2和Vue3的生命周期。
作者其他创作
大纲/内容
onRenderTracked
activated
mounted
Vue2 options API
Vue3 Composition API
destroyed
unmounted
onMounted
created
onUnmounted
Not needed*
Vue3 options API
onActivated
updated
beforeUnmount
deactivated
onDeactivated
errorCaptured
onRenderTriggered
renderTriggered
onBeforeUnmount
beforeUpdate
beforeCreate
生命周期钩子
beforeMount
renderTracked
beforeDestroy
onBeforeMount
onUpdated
onBeforeUpdate
onErrorCaptured
0 条评论
回复 删除
下一页