From ced3cea141178b4cabe2fb7911aa19e7e969cec9 Mon Sep 17 00:00:00 2001 From: LoopZhou <13745660+LoopZhou@users.noreply.github.com> Date: Mon, 15 Jan 2024 10:30:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(sticky):=20getCurrentInstance=E5=9C=A8compu?= =?UTF-8?q?ted=E4=B8=AD=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0=20(#1206)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sticky/sticky.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sticky/sticky.vue b/src/sticky/sticky.vue index 1dbc5f503..0fccbc75d 100644 --- a/src/sticky/sticky.vue +++ b/src/sticky/sticky.vue @@ -21,8 +21,8 @@ export default defineComponent({ props, setup(props) { const boxClasses = name; - const stickyContent = computed(() => renderContent(getCurrentInstance(), 'default', '')); - + const internalInstance = getCurrentInstance(); + const stickyContent = computed(() => renderContent(internalInstance, 'default', '')); // box 用于占位和记录边界 // content 用于实际定位 const boxRef = templateRef('boxRef', null);