From 21c79370566383741c7ecb0616bb2692d39aa8f7 Mon Sep 17 00:00:00 2001 From: xxm Date: Tue, 18 Aug 2026 01:43:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A5=E5=9B=9EshowDesc=E5=87=BD?= =?UTF-8?q?=E6=95=B0(commit=209f1185fc=E8=AF=AF=E5=88=A0=E8=87=B4?= =?UTF-8?q?=F0=9F=93=96=E8=AF=B4=E6=98=8E=E6=8C=89=E9=92=AE=E5=A4=B1?= =?UTF-8?q?=E6=95=88)=E5=90=AB=E8=BF=9B=E5=8C=96=E6=9D=A5=E6=BA=90?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/index.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/static/index.html b/static/index.html index 1963c1ee..7eae1491 100644 --- a/static/index.html +++ b/static/index.html @@ -2890,6 +2890,29 @@ async function runStrategyBacktest(version) { } } +function showDesc(version) { + // 2026-08-18 补回(commit 9f1185fc 误删导致📖按钮失效) + const s = (window._strats || []).find(x => x.version === version); + const d = s && s.description; + if (!d || !d.title) { alert('暂无说明'); return; } + // 用模态框展示说明(替代旧 alert,含进化说明) + const evoRows = (window._evolutionHistory || []).filter(e => e.child_version === version || e.parent_version === version); + let evoHtml = ''; + if (evoRows.length) { + evoHtml = '\n\n【进化来源】\n' + evoRows.map(e => + (e.parent_version || '?') + ' → ' + (e.child_version || version) + + (e.change_description ? ':' + e.change_description : '')).join('\n'); + } + const text = ['【' + d.title + '】', '【算法】' + (d.algorithm || ''), '【思路】' + (d.rationale || ''), '【证据】' + (d.evidence || '')].join('\n\n') + evoHtml; + const el = document.getElementById('desc-modal'); + if (el) { + el.querySelector('.modal-body').innerHTML = text.replace(/\n/g, '
'); + el.classList.remove('hidden'); + } else { + alert(text); + } +} + async function showStrategyDetail(version) { const detail = document.getElementById('strategyDetail'); detail.innerHTML = '
加载 ' + version + ' 明细...
';