fix: tab missing after costuming order (#634)

This commit is contained in:
Stephen Zhou
2024-04-22 23:06:31 +08:00
committed by GitHub
parent 2bed50f2cb
commit e51f486176

View File

@@ -33,10 +33,6 @@ const gridLayoutIcons = computed((): GridLayoutIcon[] => {
]
})
watch(() => activatedPage.value, () => {
handleBackToTop(settings.value.useSearchPageModeOnHomePage ? 510 : 0)
})
// use Json stringify to watch the changes of the array item properties
watch(() => JSON.stringify(settings.value.homePageTabVisibilityList), () => {
currentTabs.value = computeTabs()
@@ -113,6 +109,9 @@ function handleChangeTab(tab: HomeTab) {
}
return
}
else {
handleBackToTop(settings.value.useSearchPageModeOnHomePage ? 510 : 0)
}
// When the content of a tab is loading, prevent switching to another tab.
// Since `initPageAction()` within the tab replaces the `handleReachBottom` and `handlePageRefresh` functions.