From 1d6c9fa056a1cab6b0eb152c23c79bfd98a86141 Mon Sep 17 00:00:00 2001 From: xxm Date: Tue, 18 Aug 2026 08:04:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AD=96=E7=95=A5=E8=A1=A8=E9=87=8D?= =?UTF-8?q?=E5=BB=BA=E6=BB=9A=E5=8A=A8=E5=85=9C=E5=BA=95(=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E6=B8=B2=E6=9F=93=E5=89=8D=E5=AD=98scrollY,=E9=87=8D?= =?UTF-8?q?=E5=BB=BA=E5=90=8E=E6=81=A2=E5=A4=8D)+MutationObserver=E5=8E=BB?= =?UTF-8?q?=E6=8A=96=E9=98=B2=E8=87=AA=E6=BF=80=E2=80=94=E2=80=94=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E5=88=B7=E6=96=B0=E6=BB=9A=E5=8A=A8/=E5=B1=95?= =?UTF-8?q?=E5=BC=80=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/index.html | 5 +++++ 1 file changed, 5 insertions(+) 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) {