From 0d1735ab87c366c5443d8fe2b72f2a76b8dc61f9 Mon Sep 17 00:00:00 2001 From: starknt <1431880400@qq.com> Date: Thu, 11 Jan 2024 17:21:45 +0800 Subject: [PATCH] fix: page refresh not reset page num --- src/contentScripts/views/Favorites/Favorites.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/contentScripts/views/Favorites/Favorites.vue b/src/contentScripts/views/Favorites/Favorites.vue index ac03ccb3..5201ba2e 100644 --- a/src/contentScripts/views/Favorites/Favorites.vue +++ b/src/contentScripts/views/Favorites/Favorites.vue @@ -24,13 +24,16 @@ const { handlePageRefresh, handleReachBottom } = useBewlyApp() const isLoading = ref(true) const isFullPageLoading = ref(false) const noMoreContent = ref() +const noMoreContentWarning = ref(false) function initPageAction() { handleReachBottom.value = async () => { if (isLoading.value) return - if (noMoreContent.value) + if (noMoreContent.value) { + noMoreContentWarning.value = true return + } await getFavoriteResources(selectedCategory.value!.id, ++currentPageNum.value, keyword.value) } @@ -38,6 +41,7 @@ function initPageAction() { if (isLoading.value) return favoriteResources.length = 0 + currentPageNum.value = 1 handleSearch() } } @@ -236,6 +240,9 @@ function handleUnfavorite(favoriteResource: FavoriteResource) { + + +