实时汇总按实际实例模式显示:仅有 sim 或 live 时只显示对应行。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-04 09:59:32 +08:00
parent 3fb4e89753
commit d9bf3f7915
2 changed files with 10 additions and 3 deletions
+9 -2
View File
@@ -452,6 +452,14 @@
"</tr>"
);
}
const rows = [];
if (s.sim.machines > 0) rows.push(modeRow("sim", "sim", s.sim));
if (s.live.machines > 0) rows.push(modeRow("live", "live", s.live));
if (!rows.length) {
box.hidden = true;
box.innerHTML = "";
return;
}
box.hidden = false;
box.innerHTML =
'<div class="overview-mode-wrap">' +
@@ -460,8 +468,7 @@
"<thead><tr>" +
"<th>模式</th><th>在线</th><th>离线</th><th>仓位</th><th>浮盈</th><th>权利金</th><th>余额</th>" +
"</tr></thead><tbody>" +
modeRow("sim", "sim", s.sim) +
modeRow("live", "live", s.live) +
rows.join("") +
"</tbody></table></div>";
}