web: 修复目录位置不对

This commit is contained in:
Xwite
2023-05-11 08:17:00 +08:00
parent a69161e468
commit 601dafd2f6
9 changed files with 16 additions and 20 deletions
+3
View File
@@ -484,6 +484,7 @@ window.addEventListener("beforeunload", (e) => {
alert(111);
});
*/
onMounted(() => {
showLoading.value = true;
//获取书籍数据
@@ -519,6 +520,8 @@ onMounted(() => {
let data = res.data.data;
store.setCatalog(data);
store.setReadingBook(book);
// 目录使用虚拟列表显示,需要手动显示一次以便滚动到当前位置
store.popCataVisible = true;
getContent(chapterIndex, true, chapterPos);
window.addEventListener("keyup", handleKeyPress);