Keep unflat legs on 当前持仓 after plan end.
Closed plans with open legs stay visible and closable so residual positions are not orphaned from the UI. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -937,12 +937,15 @@
|
||||
const perpSide = String(perp.side || "").toLowerCase() === "short" ? "空" : "多";
|
||||
const comboCls = pnlClsNum(combo.net_usdt);
|
||||
const liqWarn = opt.liq_ok === false;
|
||||
const unflat = !!card.unflat || String(card.status || "") === "closed";
|
||||
const bidTxt =
|
||||
opt.bid != null
|
||||
? fmt(opt.bid, 4) + (opt.bid_sz != null ? "/" + fmt(opt.bid_sz, 0) : "")
|
||||
: "—";
|
||||
return (
|
||||
'<article class="hp-live-card" data-plan-id="' +
|
||||
'<article class="hp-live-card' +
|
||||
(unflat ? " hp-live-card--unflat" : "") +
|
||||
'" data-plan-id="' +
|
||||
(card.plan_id || "") +
|
||||
'">' +
|
||||
'<div class="hp-live-card-head">' +
|
||||
@@ -950,7 +953,11 @@
|
||||
(card.plan_id || "—") +
|
||||
" · " +
|
||||
(card.underlying || "") +
|
||||
"</strong></div>" +
|
||||
"</strong>" +
|
||||
(unflat
|
||||
? '<span class="hp-live-unflat-tag" title="计划已结束但腿仍持仓中">未平仓</span>'
|
||||
: "") +
|
||||
"</div>" +
|
||||
'<div class="hp-live-time-row">' +
|
||||
"<span>开仓 <strong>" +
|
||||
(card.opened_at || "—") +
|
||||
|
||||
Reference in New Issue
Block a user