左侧导航栏样式做到了统一

This commit is contained in:
2026-01-21 15:33:43 +08:00
parent fb136fc778
commit 93c8f1fcb6
20 changed files with 61411 additions and 442 deletions

View File

@@ -255,22 +255,17 @@
window.location.href = `main.html?page=model-compare-chat&id=${compareTaskId}`;
}
// 绑定重新提问按钮点击事件
function bindRestartBtn() {
const restartBtn = document.getElementById('restartBtn');
if (restartBtn) {
restartBtn.onclick = restartQuestion;
}
}
// 页面加载完成后初始化
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', initPage);
document.addEventListener('DOMContentLoaded', bindRestartBtn);
} else {
// 通过 main.html fetch 加载时,直接绑定
setTimeout(bindRestartBtn, 0);
setTimeout(initPage, 0);
initPage();
}
// 直接绑定按钮点击事件(不依赖 DOMContentLoaded因为页面可能通过 fetch 加载)
const restartBtn = document.getElementById('restartBtn');
if (restartBtn) {
restartBtn.onclick = restartQuestion;
}
</script>
</body>