From fe0d162193fddf1ed5e173065ed79d374b746751 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Sat, 13 Jul 2024 17:19:34 +0800 Subject: [PATCH] fix(components): [tree-v2] component activation content not displayed (#17511) --- packages/components/virtual-list/src/builders/build-list.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/components/virtual-list/src/builders/build-list.ts b/packages/components/virtual-list/src/builders/build-list.ts index 98b19224e2..73412a27fa 100644 --- a/packages/components/virtual-list/src/builders/build-list.ts +++ b/packages/components/virtual-list/src/builders/build-list.ts @@ -5,6 +5,7 @@ import { getCurrentInstance, h, nextTick, + onActivated, onMounted, onUpdated, ref, @@ -410,6 +411,10 @@ const createList = ({ } }) + onActivated(() => { + unref(windowRef).scrollTop = unref(states).scrollOffset + }) + const api = { ns, clientSize,