From 82ec79a46736a93ac9a0d2f4dcd92baf7947a8d4 Mon Sep 17 00:00:00 2001 From: hmo Date: Thu, 30 Jul 2026 21:56:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AF=B4=E6=98=8E/=E4=BB=93=E4=BD=8D?= =?UTF-8?q?=E5=88=97=E9=94=99=E4=BD=8D=E7=BA=A0=E6=AD=A3+=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E6=94=B9=E6=A8=A1=E6=80=81=E6=A1=86=E5=B1=95=E7=A4=BA?= =?UTF-8?q?(=E6=9B=BF=E4=BB=A3alert)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/index.html | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/static/index.html b/static/index.html index a21099a7..7326f9d3 100644 --- a/static/index.html +++ b/static/index.html @@ -1975,9 +1975,30 @@ const ASC_DEFAULT = new Set(['max_dd']); // 回撤类:小=好,默认升序 function showDesc(version) { const s = (window._strats || []).find(x => x.version === version); const d = s && s.description; - if (!d || !d.title) return alert('暂无说明'); - const text = `【${d.title}】\n\n【算法】${d.algorithm || ''}\n\n【思路】${d.rationale || ''}\n\n【证据】${d.evidence || ''}`; - alert(text); + if (!d || !d.title) { showToast('暂无说明'); return; } + const modal = document.createElement('div'); + modal.className = 'fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm'; + modal.onclick = () => modal.remove(); + modal.innerHTML = ` +
+
+

${d.title}

+ +
+
+
算法

${d.algorithm || ''}

+
思路

${d.rationale || ''}

+
证据

${d.evidence || ''}

+
+
`; + document.body.appendChild(modal); +} +function showToast(msg) { + const t = document.createElement('div'); + t.className = 'fixed top-4 right-4 z-50 bg-slate-800 border border-slate-600 rounded-lg px-4 py-2 text-sm text-slate-200 shadow-lg'; + t.textContent = msg; + document.body.appendChild(t); + setTimeout(() => t.remove(), 2000); } function sortBy(key) { @@ -2132,8 +2153,8 @@ function renderStrategyTable(strategies) { html += '' + '' + s.version + (isCurrent ? ' 当前' : '') + ((s.market && s.market !== 'all') ? ' ' + (s.market === 'hk' ? '港' : 'A') + '' : '') + '' + '' + (s.name || '') + (smallSample ? ' ⚠️' : '') + '' + - '' + ((s.description && s.description.title) ? '' : '') + '' + '' + (st.sizing_slots ? st.sizing_slots + '仓' : '10仓') + '' + + '' + ((s.description && s.description.title) ? '' : '') + '' + cell('composite', s._composite, v => v + (s._confidence != null && s._confidence < 1 ? '×' + s._confidence.toFixed(2) + '' : ''), 'font-bold text-amber-300') + cell('universality_score', (st.universality || {}).score, v => v + '/' + (st.universality || {}).months + '月') + cell('full_return_pct', (st.portfolio_full || {}).total_return_pct, v => v + '%' + ((st.portfolio_full||{}).std ? '±' + (st.portfolio_full||{}).std + '' : ''), 'font-bold text-amber-300') +