diff --git a/static/index.html b/static/index.html index cda10f42..a614d5bd 100644 --- a/static/index.html +++ b/static/index.html @@ -2250,6 +2250,7 @@ function saveBtPeriod() { } async function loadStrategyList() { + window._stratScrollY = window.scrollY || 0; // 2026-08-18 触发渲染前保存滚动位置 const listEl = document.getElementById('strategyList'); try { const ptMap = {'1m':'1m','6m':'6m','1y':'1y','2y':'2y','5y':'5y','10y':'10y'}; @@ -2467,6 +2468,8 @@ async function batchAvail(rg, available) { function renderStrategyTable(strategies) { const el = document.getElementById('strategyList'); + // 2026-08-18 滚动兜底:重建前保存整页滚动位置 + if (window._stratScrollY == null) window._stratScrollY = window.scrollY || 0; if (!strategies.length) { el.innerHTML = '
暂无策略版本
'; return; } // 先算综合分(排序要用),再排序 for (const s of strategies) { @@ -2921,6 +2924,8 @@ const renderRegimeRow = (s, rg, bkKey) => { } html += '
总收益/最终资产 = 100万本金·最多10等分仓位·24个月组合模拟 · ⚠️样本<40笔 · 绿色=该列最优 · 悬停名称查看改进假设
'; el.innerHTML = html; + // 2026-08-18 恢复整页滚动位置(解决重建后滚动归零,老莫反馈) + if (window._stratScrollY != null) { window.scrollTo(0, window._stratScrollY); window._stratScrollY = null; } } async function runStrategyBacktest(version) {