diff --git a/src/components/VirtualScroll/src/VirtualScroll.vue b/src/components/VirtualScroll/src/VirtualScroll.vue index 6eb58745da33f93a873cce353fb9262d79425387..aee4bcb984139a41bae67e3a095bda06ddbf2201 100644 --- a/src/components/VirtualScroll/src/VirtualScroll.vue +++ b/src/components/VirtualScroll/src/VirtualScroll.vue @@ -111,11 +111,13 @@ () => props.items.length, () => { if (props.scrollToBottom) { - const wrapEl = unref(wrapElRef); - if (!wrapEl) { - return; - } - wrapEl.scrollTop = (props.items || []).length * unref(getItemHeightRef); + nextTick(() => { + const wrapEl = unref(wrapElRef); + if (!wrapEl) { + return; + } + wrapEl.scrollTop = (props.items || []).length * unref(getItemHeightRef); + }); } }, );