Небольшие поправки

This commit is contained in:
Book Pauk
2022-07-14 16:14:25 +07:00
parent 37ab3493db
commit 04713f47c8

View File

@@ -264,6 +264,7 @@ class RecentBooksPage {
this.showBar(); this.showBar();
await this.updateTableData(); await this.updateTableData();
await this.scrollToActiveBook(); await this.scrollToActiveBook();
//await this.scrollRefresh();
})(); })();
} }
@@ -435,8 +436,6 @@ class RecentBooksPage {
//..... //.....
this.tableData = result; this.tableData = result;
this.$refs.virtualScroll.refresh();
} finally { } finally {
this.lock.ret(); this.lock.ret();
} }
@@ -569,6 +568,8 @@ class RecentBooksPage {
} }
async scrollToActiveBook() { async scrollToActiveBook() {
await this.$nextTick();
this.lockScroll = true; this.lockScroll = true;
try { try {
let activeIndex = -1; 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() { get sortMethodOptions() {
return [ return [