From ff51500f34fc671dbb08852b02d78b318d61d20d Mon Sep 17 00:00:00 2001 From: big_sun_962464 Date: Fri, 12 Jul 2024 14:52:00 +0800 Subject: [PATCH] Fri Jul 12 14:52:00 CST 2024 inscode --- src/components/Com1.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/Com1.vue b/src/components/Com1.vue index c5b48ae..b700a86 100644 --- a/src/components/Com1.vue +++ b/src/components/Com1.vue @@ -15,6 +15,7 @@ async function addMsg() { debugger console.log(h2Ref.value.innerHTML) await nextTick() + debugger console.log(h2Ref.value.innerHTML) } @@ -74,6 +75,7 @@ onBeforeUnmount(() => { * * 当这个钩子被调用时,组件实例依然还保有全部的功能 */ + console.log(h2Ref.value) debugger }) onUnmounted(() => { @@ -85,6 +87,7 @@ onUnmounted(() => { * 所有相关的响应式作用 (渲染作用以及 setup() 时创建的计算属性和侦听器) 都已经停止 * 可以在这个钩子中手动清理一些副作用,例如计时器、DOM 事件监听器或者与服务器的连接 */ + console.log(h2Ref.value) debugger }) \ No newline at end of file -- GitLab