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>
</div>
<div className="kv">
<span></span>
<span className="mono">
{selectedGroup.initial_premium != null
? `${fmt(selectedGroup.initial_premium)} USDT`
: "—"}
</span>
</div>
<div className="kv">
<span></span>
<span className="mono">
@@ -525,25 +533,36 @@ export default function TradesPage() {
</div>
) : null}
{fills.map((f) => (
<div key={f.id} className="trade-fill kv">
<span className="mono">
{fillDescZh(
f.leg,
f.action,
f.side,
selectedGroup.close_reason,
)}
{f.inst_id ? (
<span className="meta"> · {f.inst_id}</span>
) : null}
</span>
<span className="mono">
{f.fill_px.toFixed(4)} · {f.qty_eth} · {" "}
{f.fee.toFixed(4)}
</span>
</div>
))}
{fills.map((f) => {
const isOpt = f.leg === "option";
const pxLabel = isOpt ? "权利金" : "价";
const notional =
isOpt && f.action === "open"
? Number(f.fill_px) * Number(f.qty_eth)
: null;
return (
<div key={f.id} className="trade-fill kv">
<span className="mono">
{fillDescZh(
f.leg,
f.action,
f.side,
selectedGroup.close_reason,
)}
{f.inst_id ? (
<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 ? (
<div className="trade-pnl-block">
+6
View File
@@ -949,6 +949,12 @@ input {
overflow: hidden;
}
/* 策略机交易记录详情:加宽,减少换行 */
.modal-dialog.trade-detail-modal {
width: min(920px, 100%);
max-height: min(90vh, 960px);
}
.modal-head {
display: flex;
align-items: center;