import { onBeforeMount, onMounted, onBeforeUpdate, onUpdated, onBeforeUnmount, onUnmounted} from "vue"
1、onBeforeMount创建
onBeforeMount(()=>{
// 创建之前
})
onMounted(()=>{
// 创建完成
})
2、onBeforeUpdate更新
onBeforeUpdate(()=>{
// 更新之前
})
onUpdated(()=>{
// 更新完成
})
3、onBeforeUnmount销毁
// v-if会触发组件销毁生命周期
onBeforeUnmount(()=>{
// 销毁之前
})
onUnmounted(()=>{
// 销毁完成
})