onBeforeMount(() => {
console.log('组件挂载之前执行 ===> onBeforeMount')
})
onMounted(() => {
console.log('组件挂载完毕 ===> onMounted')
})
// 依赖于组件内响应式数据的变化
onBeforeUpdate(() => {
console.log('组件更新之前 ===> onBeforeUpdate')
})
onUpdated(() => {
console.log('组件更新完毕 ===> onUpdated')
})
onBeforeUnmount(() => {
console.log('组件卸载之前 ===> onBeforeUnmount')
})
onUnmounted(() => {
console.log('组件卸载完毕 ===> onUnmount')
})
vue3常用生命周期
猜你喜欢
转载自blog.csdn.net/weixin_45932157/article/details/125934232
今日推荐
周排行