双买持仓表新增盈亏平衡点列;交易记录无平仓品种时隐藏统计面板

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
fish
2026-07-29 10:54:26 +08:00
parent 9c04ad642e
commit 934d83829a
2 changed files with 5 additions and 1 deletions
+2
View File
@@ -295,6 +295,7 @@
{% set ns.close_fee = ns.close_fee + (t.close_fee or 0) %}
{% endfor %}
{% set net = ns.gross - ns.open_fee - ns.close_fee %}
{% if summary_trades %}
<div style="display:flex;gap:24px;margin-bottom:24px;padding:12px 18px;background:var(--surface);border:1px solid var(--border);border-radius:8px;font-size:0.88rem;flex-wrap:wrap;">
<span>平仓盈亏 <b style="{% if ns.gross > 0 %}color:var(--danger-fg);{% elif ns.gross < 0 %}color:var(--success-fg);{% endif %}">{% if ns.gross > 0 %}+{% endif %}{{ '%.2f'|format(ns.gross) }}</b></span>
<span style="color:var(--sub);">|</span>
@@ -306,6 +307,7 @@
<span style="color:var(--sub);">|</span>
<span>收益 <b style="{% if net > 0 %}color:var(--danger-fg);{% elif net < 0 %}color:var(--success-fg);{% endif %}">{% if net > 0 %}+{% endif %}{{ '%.2f'|format(net) }}</b></span>
</div>
{% endif %}
{% else %}
<div style="text-align:center;padding:60px;color:var(--sub);">暂无已平仓记录</div>
{% endif %}