From 7a5d5df28ba79ff6830e899bd440d2cdaf10b51a Mon Sep 17 00:00:00 2001 From: bourdon Date: Sat, 4 Oct 2025 01:48:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9Awebapp=20=E5=8F=AA?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=88=B7=E6=96=B0=E7=BB=9F=E8=AE=A1=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=EF=BC=8C=E6=97=A5=E5=BF=97=E9=9C=80=E6=89=8B=E5=8A=A8?= =?UTF-8?q?=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 定时器只更新统计信息,不自动加载日志记录 - 日志需要用户手动点击「刷新日志」或翻页按钮查看 - 避免在用户浏览历史记录时被自动刷新打断 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- example/webapp/main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/example/webapp/main.go b/example/webapp/main.go index ffb9830..035f095 100644 --- a/example/webapp/main.go +++ b/example/webapp/main.go @@ -483,13 +483,12 @@ func handleIndex(w http.ResponseWriter, r *http.Request) { // 初始化 loadTopics(); - // 不再自动刷新 topics 列表 + // 只自动刷新统计信息,不刷新日志 setInterval(() => { if (currentTopic) { loadStats(currentTopic); - loadLogs(); } - }, 3000); // 每 3 秒刷新日志 + }, 3000); // 每 3 秒刷新统计 `