From 7b8ad6abc875eaedbe5b33e3cfce2394d3d0dd9b Mon Sep 17 00:00:00 2001 From: jackyu66git Date: Mon, 4 May 2026 05:43:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BA=A4=E6=98=93=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E5=87=80=E6=94=B6=E7=9B=8A=E6=80=BB=E8=AE=A1=E5=8A=A0=E7=BE=8E?= =?UTF-8?q?=E5=85=83=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 5f2cd7a..bcf421a 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -458,6 +458,8 @@ function TradeDetailModal({ trade, orders, onClose }) { // Compute USD PnL per leg: AmountUSD * Pnl% / 100 const longPnlUSD = trade.AmountUSD && trade.LongPnl != null ? trade.AmountUSD * trade.LongPnl / 100 : null const shortPnlUSD = trade.AmountUSD && trade.ShortPnl != null ? trade.AmountUSD * trade.ShortPnl / 100 : null + // Net PnL USD = total capital (both sides) * NetPnl% / 100 + const netPnlUSD = trade.AmountUSD && trade.NetPnl != null ? 2 * trade.AmountUSD * trade.NetPnl / 100 : null return (
@@ -511,7 +513,7 @@ function TradeDetailModal({ trade, orders, onClose }) {

净收益

总计 - {trade.NetPnl != null ? trade.NetPnl.toFixed(4) + '%' : '-'} + {trade.NetPnl != null ? trade.NetPnl.toFixed(4) + '%' : '-'} {netPnlUSD != null ? (${netPnlUSD.toFixed(4)}) : null}