组件的生命周期分为4个阶段-------create/mount(挂载)/update/destroy

其中每个阶段都有对应的处理函数

create: 创建:初始化操作   执行1次

beforeCreate

created:

mount:挂载DOM树   执行1次

baforeMount:

mounted:

update:数据更新->操作或逻辑判断  执行n次

beforeUpdate:

updated:

destroy:清理工作  执行1次

beforeDestroy:

destroyed:

vue组件的生命周期

 

相关文章:

  • 2021-12-27
  • 2022-01-03
  • 2021-10-12
  • 2022-01-07
  • 2021-07-14
  • 2021-08-25
猜你喜欢
  • 2021-06-08
  • 2021-05-31
  • 2021-12-05
  • 2021-10-16
  • 2021-06-12
  • 2021-04-17
  • 2021-08-20
  • 2021-12-09
相关资源
相似解决方案