vue的钩子函数

一共有十一个,但是常见的八个,常用的三四个
beforCreate(创建之前)
Created(创建之后)
beforMount(载入之前)
Mounted(载入之后)
beforUpdate(更新之前)
Updated(更新之后)
beforDestroy(销毁之前)
Destroyed(销毁之后)
activate(keep-alive组件激活时调用)
deactivated(keep-alive组件停用时调用)
errorCaptured(这个组件的作用是接受子孙组件报错是调用,三个参数 错误对象、错误的组件、错误信息)

猜你喜欢

转载自blog.csdn.net/qq_40532848/article/details/81394433