这个从Vue2 到Vue3的生命周期映射是直接从Vue 3 Composition API文档中获得的:
beforeCreate -> 使用 setup()
created -> 使用 setup()
beforeMount -> onBeforeMount
mounted -> onMounted
beforeUpdate -> onBeforeUpdate
updated -> onUpdated
beforeDestroy -> onBeforeUnmount
destroyed -> onUnmounted
errorCaptured -> onErrorCaptured
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)