fix: 进化面板字号放大(text-xs→text-sm)
This commit is contained in:
+6
-6
@@ -1979,21 +1979,21 @@ async function loadEvolutionBox() {
|
||||
try {
|
||||
const r = await fetch('/api/evolution/dashboard');
|
||||
const d = await r.json();
|
||||
let h = '<div class="flex items-center justify-between mb-1"><span class="text-xs font-semibold text-emerald-400">🧬 策略自我进化</span><button onclick="loadEvolutionBox()" class="text-[10px] text-blue-400">刷新</button></div>';
|
||||
let h = '<div class="flex items-center justify-between mb-1"><span class="text-sm font-semibold text-emerald-400">🧬 策略自我进化</span><button onclick="loadEvolutionBox()" class="text-xs text-blue-400 hover:text-blue-300">刷新</button></div>';
|
||||
if (d.baseline) {
|
||||
h += '<div class="grid grid-cols-3 gap-2 mb-2">';
|
||||
h += '<div class="grid grid-cols-3 gap-2 mb-2 text-sm">';
|
||||
for (const [v, b] of Object.entries(d.baseline)) {
|
||||
const clr = v === 'v_next4' ? 'text-emerald-400' : 'text-slate-300';
|
||||
h += '<div class="bg-slate-900/50 rounded px-2 py-1"><span class="'+clr+' font-mono font-bold text-xs">'+v+'</span><br><span class="text-slate-500 text-[10px]">胜率'+b.win_rate+'% 收益'+b.total_return+'%</span></div>';
|
||||
h += '<div class="bg-slate-900/50 rounded px-2 py-1"><span class="'+clr+' font-mono font-bold">'+v+'</span><br><span class="text-slate-500 text-xs">胜率'+b.win_rate+'% 收益'+b.total_return+'% 回撤'+b.max_dd+'%</span></div>';
|
||||
}
|
||||
h += '</div>';
|
||||
}
|
||||
if (d.health && d.health.length > 0) { const hs = d.health[0]; const sc = hs.health_score;
|
||||
const color = sc >= 70 ? 'text-emerald-400' : sc >= 50 ? 'text-amber-400' : 'text-red-400';
|
||||
h += '<div class="text-xs '+color+'">健康度: '+sc+'分 (实盘'+hs.live_trades+'笔)</div>'; }
|
||||
h += '<div class="text-sm '+color+'">健康度: '+sc+'分 (实盘'+hs.live_trades+'笔)</div>'; }
|
||||
if (d.lessons && d.lessons.length > 0) {
|
||||
h += '<div class="text-xs text-slate-500 mt-1">最近教训:</div>';
|
||||
for (const l of d.lessons.slice(0,3)) h += '<div class="text-xs text-slate-400">'+(l.lesson_type==='win_pattern'?'✅':'❌')+' '+l.lesson_text+'</div>';
|
||||
h += '<div class="text-sm text-slate-400 mt-2">📝 最近教训:</div>';
|
||||
for (const l of d.lessons.slice(0,3)) h += '<div class="text-sm text-slate-300">'+(l.lesson_type==='win_pattern'?'✅':'❌')+' '+l.lesson_text+'</div>';
|
||||
}
|
||||
box.innerHTML = h;
|
||||
} catch (e) { box.innerHTML = '<div class="text-xs text-red-400">加载失败</div>'; }
|
||||
|
||||
Reference in New Issue
Block a user