vue3.0 生命周期
vue3.0 生命周期

setup() 替代

beforecreate -> use setup()
created -> use setup()


前面加on

beforeMount -> onBeforeMount
mounted -> onMounted
beforeUpdate -> onbeforeUpdate
updated -> onUpdated
activated -> onActivated
deactivated -> onDeactivated
errorCaptured -> onErrorCaptured


更改名称

beforeDestroy -> onBeforeUnmount
destroyed -> onUnmounted


新加入

onRenderTracked
onRenderTriggered
主要用于开发阶段调试使用

相关文章:

  • 2021-09-03
  • 2021-10-17
  • 2021-09-14
  • 2021-08-25
  • 2022-02-21
  • 2021-09-15
  • 2021-12-12
  • 2021-11-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
相关资源
相似解决方案