feat: 点击历史记录时,不会再打开新建标签页
This commit is contained in:
parent
51d1a4a1a2
commit
5c1c66bd8f
|
|
@ -20,7 +20,7 @@ window.showHistoryDetail = function(id) {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn('[showHistoryDetail] Failed to save doc id to localStorage', 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。
|
* @param {string} id - 要查看详情的历史记录的唯一 ID。
|
||||||
*/
|
*/
|
||||||
|
|
@ -2206,7 +2206,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn('[showHistoryDetail] Failed to save doc id to localStorage', 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);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue