From 39f60c876382191a381e53dcd796900a9a4f2eaf Mon Sep 17 00:00:00 2001 From: gkshi Date: Mon, 13 May 2024 15:33:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=A6=96=E6=AC=A1?= =?UTF-8?q?=E6=9C=AA=E6=BB=A1=E5=B1=8F=E6=97=B6=E5=8F=AF=E8=83=BD=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E5=A4=9A=E6=AC=A1=E5=8A=A0=E8=BD=BD=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/v3-waterfall.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/v3-waterfall.vue b/lib/v3-waterfall.vue index 1ae4bd1..6f5f30f 100644 --- a/lib/v3-waterfall.vue +++ b/lib/v3-waterfall.vue @@ -182,7 +182,7 @@ const { anchorObserver, anchorDisconnect, anchorIsHidden } = useAnchorObserver() // 校验加载一次数据后底部锚点元素是否隐藏,没隐藏还需要再加载一次数据 watch(actualLoading, (newV) => { - if (!newV) { + if (!newV && !isOver.value) { setTimeout(() => { const viewport = scrollElement || document.documentElement || document.body const anchor = document.getElementById(anchorID) @@ -223,6 +223,7 @@ watch(isOver, (newV, oldV) => { }) const waterfall = async (noLayoutedList: WaterfallList) => { + if (!noLayoutedList || !noLayoutedList.length) return isInnerLoading.value = true try { await layout(noLayoutedList) @@ -296,6 +297,7 @@ const reRender = init // 在队列之前插入,支持类似下拉刷新的场景 const insertBefore = async (insertList: WaterfallList) => { + if (!insertList || !insertList.length) return isInnerLoading.value = true try { const listRef = ref(insertList) as Ref>