diff --git a/src/components/list/ArticleList3.vue b/src/components/list/ArticleList3.vue index 98323434..3fbacc79 100644 --- a/src/components/list/ArticleList3.vue +++ b/src/components/list/ArticleList3.vue @@ -71,6 +71,16 @@ watch(() => props.list, () => { // listRef.scrollTo(0, 0) }) +function scrollToBottom() { + listRef.scrollToBottom() +} + +function scrollToItem(index: number) { + listRef.scrollToItem(index) +} + +defineExpose({scrollToBottom, scrollToItem}) +