Skip to content

RecycleScroller组件的scrollToItem未生效 #910

@simplestmaker

Description

@simplestmaker

Describe the bug

使用RecycleScroller组件绑定实例,通过实例再onMounted时调用scrollToItem实现默认到滚动到最后一个,但是未能生效,后续我改成:
模板结构:

watch(
[() => allShowDynameicPropertyList.value.length, dynameicPropertyPanelRef],
async ([listLength, scrollerInstance], [_oldListLength]) => {
if (listLength > 0 && scrollerInstance) {
await nextTick()
scrollerInstance.scrollToItem(allShowDynameicPropertyList.value.length -1)
}
},
{ immediate: true }
)依然不行,是配置还有问题吗

Reproduction

System Info

vue-virtual-scroller版本2.0.0-beta.8

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions