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);