keep scroll position

This commit is contained in:
Timi
2026-10-29 12:00:38 +08:00
parent 04fd57a4c3
commit f51d62b7d4
3 changed files with 9 additions and 5 deletions
+4 -2
View File
@@ -150,7 +150,7 @@ let unregisterProductListEvent: (() => void) | undefined;
let isDisposed = false;
function getProductListPage(): HTMLElement | null {
return productListRef.value?.closest<HTMLElement>(".page") || null;
return productListRef.value?.querySelector<HTMLElement>(".pull-refresh") || null;
}
function savePageScrollPosition(): void {
@@ -404,7 +404,9 @@ onActivated(() => {
});
onDeactivated(() => {
savePageScrollPosition();
if (savedPageScrollTop === undefined) {
savePageScrollPosition();
}
});
watch(keyword, () => {