From 8dd946eac88674f86370048b58357f54fd300c70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=AD=96?= <1055104544@qq.com> Date: Thu, 26 Mar 2026 17:57:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=9B=AE=E5=BD=95=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=BB=9A=E5=8A=A8=E5=88=B0=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E7=AB=A0=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alacarte-novel-website/reader.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/alacarte-novel-website/reader.html b/alacarte-novel-website/reader.html index 2549051..1a310bc 100644 --- a/alacarte-novel-website/reader.html +++ b/alacarte-novel-website/reader.html @@ -575,6 +575,14 @@ html += `第${ch.id}章:${ch.title}`; }); tocList.innerHTML = html; + + // 自动滚动到当前章节 + setTimeout(() => { + const currentItem = tocList.querySelector('.current'); + if (currentItem) { + currentItem.scrollIntoView({ behavior: 'smooth', block: 'center' }); + } + }, 100); } // 更新移动端目录高亮