From 04713f47c857df44834cffb7e21969108348d7e6 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Thu, 14 Jul 2022 16:14:25 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reader/RecentBooksPage/RecentBooksPage.vue | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/client/components/Reader/RecentBooksPage/RecentBooksPage.vue b/client/components/Reader/RecentBooksPage/RecentBooksPage.vue index 1209b876..98d86fc3 100644 --- a/client/components/Reader/RecentBooksPage/RecentBooksPage.vue +++ b/client/components/Reader/RecentBooksPage/RecentBooksPage.vue @@ -264,6 +264,7 @@ class RecentBooksPage { this.showBar(); await this.updateTableData(); await this.scrollToActiveBook(); + //await this.scrollRefresh(); })(); } @@ -435,8 +436,6 @@ class RecentBooksPage { //..... this.tableData = result; - - this.$refs.virtualScroll.refresh(); } finally { this.lock.ret(); } @@ -569,6 +568,8 @@ class RecentBooksPage { } async scrollToActiveBook() { + await this.$nextTick(); + this.lockScroll = true; try { let activeIndex = -1; @@ -614,6 +615,16 @@ class RecentBooksPage { } } + async scrollRefresh() { + this.lockScroll = true; + await utils.sleep(100); + try { + this.$refs.virtualScroll.refresh(); + } finally { + await utils.sleep(100); + this.lockScroll = false; + } + } get sortMethodOptions() { return [