VUE生命周期

beforeCreate(创建前)
created(创建完毕)
beforeMount(挂载前)
mounted(挂载结束)
beforeUpdate(更新前)
updated(更新完成)
beforeDestroy(销毁前)
destroyed(销毁完成)
vue3
与2一致,修改了一些
beforeCreate -> 不需要
created -> 不需要
beforeMount -> onBeforeMount
mounted -> onMounted
beforeUpdate -> onBeforeUpdate
updated -> onUpdated
beforeUnmount -> onBeforeUnmount
unmounted -> onUnmounted
errorCaptured -> onErrorCaptured
renderTracked -> onRenderTracked
renderTriggered -> onRenderTriggered
父子组件声明周期
父beforeCreate-> 父create -> 子beforeCreate-> 子created -> 子mounted -> 父mounted
