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); }; /**