From 5c1c66bd8f49c7c793d942acd45d8a5bf8cffb8d Mon Sep 17 00:00:00 2001 From: MT-Mint <798521692@qq.com> Date: Mon, 23 Mar 2026 13:51:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=82=B9=E5=87=BB=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=97=B6=EF=BC=8C=E4=B8=8D=E4=BC=9A=E5=86=8D?= =?UTF-8?q?=E6=89=93=E5=BC=80=E6=96=B0=E5=BB=BA=E6=A0=87=E7=AD=BE=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/history/history.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/history/history.js b/js/history/history.js index 3ed1db7..a4890ce 100644 --- a/js/history/history.js +++ b/js/history/history.js @@ -20,7 +20,7 @@ window.showHistoryDetail = function(id) { } catch (e) { console.warn('[showHistoryDetail] Failed to save doc id to localStorage', e); } - window.open('views/history/history_detail.html?id=' + encodeURIComponent(id), '_blank'); + window.location.href = 'views/history/history_detail.html?id=' + encodeURIComponent(id); }; // ===================== @@ -2195,8 +2195,8 @@ document.addEventListener('DOMContentLoaded', function() { }; /** - * (全局可调用) 在新的浏览器标签页或窗口中显示指定历史记录的详细信息。 - * 它通过构建一个指向 `views/history/history_detail.html` 的 URL (包含记录 ID 作为查询参数) 并使用 `window.open` 实现。 + * (全局可调用) 在当前页面显示指定历史记录的详细信息。 + * 它通过构建一个指向 `views/history/history_detail.html` 的 URL (包含记录 ID 作为查询参数) 实现。 * * @param {string} id - 要查看详情的历史记录的唯一 ID。 */ @@ -2206,7 +2206,7 @@ document.addEventListener('DOMContentLoaded', function() { } catch (e) { console.warn('[showHistoryDetail] Failed to save doc id to localStorage', e); } - window.open('views/history/history_detail.html?id=' + encodeURIComponent(id), '_blank'); + window.location.href = 'views/history/history_detail.html?id=' + encodeURIComponent(id); }; /**