Show option premium in trade detail and widen the modal.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-02 10:25:33 +08:00
parent cad86813dc
commit 05520f82bd
2 changed files with 44 additions and 19 deletions
+38 -19
View File
@@ -481,6 +481,14 @@ export default function TradesPage() {
: "—"} : "—"}
</span> </span>
</div> </div>
<div className="kv">
<span></span>
<span className="mono">
{selectedGroup.initial_premium != null
? `${fmt(selectedGroup.initial_premium)} USDT`
: "—"}
</span>
</div>
<div className="kv"> <div className="kv">
<span></span> <span></span>
<span className="mono"> <span className="mono">
@@ -525,25 +533,36 @@ export default function TradesPage() {
</div> </div>
) : null} ) : null}
{fills.map((f) => ( {fills.map((f) => {
<div key={f.id} className="trade-fill kv"> const isOpt = f.leg === "option";
<span className="mono"> const pxLabel = isOpt ? "权利金" : "价";
{fillDescZh( const notional =
f.leg, isOpt && f.action === "open"
f.action, ? Number(f.fill_px) * Number(f.qty_eth)
f.side, : null;
selectedGroup.close_reason, return (
)} <div key={f.id} className="trade-fill kv">
{f.inst_id ? ( <span className="mono">
<span className="meta"> · {f.inst_id}</span> {fillDescZh(
) : null} f.leg,
</span> f.action,
<span className="mono"> f.side,
{f.fill_px.toFixed(4)} · {f.qty_eth} · {" "} selectedGroup.close_reason,
{f.fee.toFixed(4)} )}
</span> {f.inst_id ? (
</div> <span className="meta"> · {f.inst_id}</span>
))} ) : null}
</span>
<span className="mono">
{pxLabel} {f.fill_px.toFixed(4)} · {f.qty_eth}
{notional != null && Number.isFinite(notional)
? ` · 合计 ${notional.toFixed(2)}`
: ""}{" "}
· {f.fee.toFixed(4)}
</span>
</div>
);
})}
{summary ? ( {summary ? (
<div className="trade-pnl-block"> <div className="trade-pnl-block">
+6
View File
@@ -949,6 +949,12 @@ input {
overflow: hidden; overflow: hidden;
} }
/* 策略机交易记录详情:加宽,减少换行 */
.modal-dialog.trade-detail-modal {
width: min(920px, 100%);
max-height: min(90vh, 960px);
}
.modal-head { .modal-head {
display: flex; display: flex;
align-items: center; align-items: center;