Relax perp order dialog spacing; fix styles when dialog mounts on body.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-14 16:25:22 +08:00
parent 7d29181a04
commit 5c95625817
3 changed files with 194 additions and 39 deletions
+15 -15
View File
@@ -101,22 +101,22 @@
</div>
<div id="hp-opt-bal-line" class="muted hp-po-meta hp-opt-bal-line"></div>
<!-- 弹窗下单 -->
<!-- 弹窗下单(挂到 body 时样式靠 .hp-po-order-dialog 自身,不依赖页 wrap) -->
<div id="hp-order-panel-host" class="opt-order-backdrop" hidden aria-hidden="true">
<div id="hp-order-panel" class="opt-order-dialog hp-po-order-dialog" role="dialog" aria-modal="true" aria-labelledby="hp-order-dialog-title" style="display:none">
<div class="opt-order-dialog-head">
<h3 class="opt-order-title" id="hp-order-dialog-title">手动下单 · <span id="hp-perp-uly-label">ETH</span></h3>
<button type="button" class="btn-secondary" id="hp-order-close-btn" style="font-size:.72rem;padding:2px 10px">取消</button>
<button type="button" class="hp-po-dialog-x" id="hp-order-close-btn" aria-label="关闭">×</button>
</div>
<div class="opt-order-layout">
<div class="opt-order-main">
<div id="hp-sel-inst" class="options-order-inst">—</div>
<div class="hp-po-quote-compact">
<span id="hp-po-mark" class="hp-po-mark" aria-live="polite">标记 —</span>
<span class="muted" id="hp-premium-line"></span>
<div class="hp-po-dialog-meta">
<div id="hp-sel-inst" class="options-order-inst">—</div>
<p class="muted hp-po-dialog-sub" id="hp-premium-line"></p>
<p class="muted hp-po-dialog-sub" id="hp-po-mark" aria-live="polite">标记 —</p>
<p id="hp-perp-quote" class="muted hp-po-dialog-sub" hidden>加载中…</p>
<p id="hp-po-perp-quote-right" class="muted" hidden></p>
</div>
<p id="hp-perp-quote" class="muted hp-po-meta hp-po-quote-one">加载中…</p>
<p id="hp-po-perp-quote-right" class="muted hp-po-meta" hidden></p>
<span id="hp-po-mode-badge" class="hp-po-mode-badge" hidden>手动下单</span>
<span id="hp-po-card-title" hidden>下单</span>
<span class="muted hp-acct-tag" id="hp-perp-acct-tag" hidden>合约账户</span>
@@ -140,7 +140,7 @@
</label>
</div>
<div id="hp-po-fields-option-primary">
<div id="hp-po-fields-option-primary" class="hp-po-dialog-body">
<section class="hp-po-section">
<h3 class="hp-po-section-title">开仓</h3>
<div class="hp-po-fields hp-po-fields--section hp-po-fields--capital">
@@ -159,15 +159,15 @@
</div>
</section>
<section class="hp-po-section">
<h3 class="hp-po-section-title">出场条件 <span class="muted" style="font-weight:500;font-size:.78rem">必填其一</span></h3>
<h3 class="hp-po-section-title">出场条件</h3>
<div class="hp-oo-seg hp-po-exit-seg" role="group" aria-label="出场方式">
<button type="button" class="btn-secondary hp-po-exit-mode is-selected" data-exit="profit"><span class="hp-oo-check" aria-hidden="true">✓</span>盈利金额出场</button>
<button type="button" class="btn-secondary hp-po-exit-mode" data-exit="target"><span class="hp-oo-check" aria-hidden="true">✓</span>目标位出场</button>
<button type="button" class="btn-secondary hp-po-exit-mode is-selected" data-exit="profit"><span class="hp-oo-check" aria-hidden="true">✓</span>盈利金额</button>
<button type="button" class="btn-secondary hp-po-exit-mode" data-exit="target"><span class="hp-oo-check" aria-hidden="true">✓</span>目标位</button>
</div>
<div class="hp-po-fields hp-po-fields--section" id="hp-po-exit-profit">
<label class="hp-po-field hp-po-field--wide">
<span class="hp-po-field-lab">目标盈利 <em>USDT</em></span>
<input type="number" step="any" min="0.01" id="hp-profit-target" placeholder="必填 · 扣双边手续费后净利" autocomplete="off" inputmode="decimal" data-lpignore="true" data-1p-ignore="true" data-form-type="other" required />
<input type="number" step="any" min="0.01" id="hp-profit-target" placeholder="扣双边手续费后净利" autocomplete="off" inputmode="decimal" data-lpignore="true" data-1p-ignore="true" data-form-type="other" required />
</label>
</div>
<div class="hp-po-fields hp-po-fields--section hidden" id="hp-po-exit-target" hidden>
@@ -194,8 +194,8 @@
</div>
<div class="opt-order-dialog-actions">
<span id="hp-po-strategy-status" class="hp-po-strategy-status" aria-live="polite"></span>
<button type="button" class="btn-primary" id="hp-preview-btn" title="卖一限价开期权+永续对冲">手动下单</button>
<button type="button" class="btn-secondary" id="hp-order-cancel-btn">取消</button>
<button type="button" class="btn-primary" id="hp-preview-btn" title="卖一限价开期权+永续对冲">手动下单</button>
</div>
</div>
</div>
@@ -426,4 +426,4 @@
</div>
</div>
</div>
<script src="/static/hedge_plan.js?v=52"></script>
<script src="/static/hedge_plan.js?v=53"></script>