fix(options): expand-all widens money filter so more strikes show
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1452,7 +1452,15 @@
|
||||
hint.innerHTML =
|
||||
'<td colspan="' +
|
||||
cols +
|
||||
'" class="muted opt-strike-hint">默认显示 Call/Put 各最近 3 档 · 勾选「显示全部」查看更多</td>';
|
||||
'" class="muted opt-strike-hint">默认显示 Call/Put 各最近 3 档 · 点「显示全部」查看该到期更多行权价(若当前为「仅平值」会自动切到「平/虚」)</td>';
|
||||
tbody.appendChild(hint);
|
||||
} else if (state.ooStrikeExpandAll && state.ooMoneyFilter === "otm") {
|
||||
const hint = document.createElement("tr");
|
||||
hint.className = "opt-strike-hint-row";
|
||||
hint.innerHTML =
|
||||
'<td colspan="' +
|
||||
cols +
|
||||
'" class="muted opt-strike-hint">当前为「仅虚值」筛选 · 切到「平/虚」可看平值档</td>';
|
||||
tbody.appendChild(hint);
|
||||
}
|
||||
tbody.querySelectorAll(".hp-oo-pick").forEach(function (btn) {
|
||||
@@ -1974,6 +1982,11 @@
|
||||
if ($("hp-oo-expand-all")) {
|
||||
$("hp-oo-expand-all").addEventListener("click", function () {
|
||||
state.ooStrikeExpandAll = !state.ooStrikeExpandAll;
|
||||
// 「仅平值」时本来就只有 1~3 档,展开几乎无变化;展开时自动切到平/虚以便看到全部可选档
|
||||
if (state.ooStrikeExpandAll && state.ooMoneyFilter === "atm") {
|
||||
state.ooMoneyFilter = "atm_otm";
|
||||
syncMoneyUI();
|
||||
}
|
||||
syncOoExpandUI();
|
||||
renderTStrikes();
|
||||
});
|
||||
|
||||
@@ -2219,6 +2219,11 @@
|
||||
if (expandAllCb) {
|
||||
expandAllCb.addEventListener("change", function () {
|
||||
state.strikeExpandAll = !!expandAllCb.checked;
|
||||
// 实值/虚值筛选下档位本来就少,展开几乎不变;勾选时切回「全部」才有意义
|
||||
if (state.strikeExpandAll && state.moneyFilter !== "all") {
|
||||
state.moneyFilter = "all";
|
||||
syncMoneyFilterButtons();
|
||||
}
|
||||
renderStrikes();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
<button type="button" class="btn-secondary hp-oo-recommend-btn" id="hp-oo-recommend-atm" data-oo-rec="atm_straddle" title="最近平值 Call+Put" aria-pressed="false"><span class="hp-oo-check" aria-hidden="true">✓</span>推荐跨式</button>
|
||||
<button type="button" class="btn-secondary hp-oo-recommend-btn" id="hp-oo-recommend-otm" data-oo-rec="double_otm" title="最近虚值 Call+Put" aria-pressed="false"><span class="hp-oo-check" aria-hidden="true">✓</span>推荐双虚</button>
|
||||
<button type="button" class="btn-secondary" id="hp-oo-load-chain">刷新链</button>
|
||||
<button type="button" class="btn-secondary hp-oo-expand-btn" id="hp-oo-expand-all" title="默认只显示 Call/Put 各最近 3 档" aria-pressed="false"><span class="hp-oo-check" aria-hidden="true">✓</span>显示全部</button>
|
||||
<button type="button" class="btn-secondary hp-oo-expand-btn" id="hp-oo-expand-all" title="展开该到期全部平值/虚值行权价;若当前为「仅平值」会自动切到「平/虚」" aria-pressed="false"><span class="hp-oo-check" aria-hidden="true">✓</span>显示全部</button>
|
||||
</div>
|
||||
<div class="options-strike-table-wrap hp-oo-table-wrap" id="hp-oo-table-wrap">
|
||||
<table class="options-strike-table options-strike-table--t" id="hp-oo-table">
|
||||
@@ -406,4 +406,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/static/hedge_plan.js?v=44"></script>
|
||||
<script src="/static/hedge_plan.js?v=45"></script>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<li><strong>列表</strong>含卖一/买一;<strong>T 型</strong>仅卖一(买方开仓),中间为跨式双买测算。</li>
|
||||
<li>环境配置「链上仅显示有卖一」开启时,隐藏无真实卖一或深度不足 1 张的合约(估算价 <strong>~</strong> 亦不显示)。</li>
|
||||
<li><strong>开仓只认真实卖一价且卖一深度≥1</strong>;无深度时面板显示参考标记价并禁用买入。</li>
|
||||
<li>链展示近 <span id="opt-chain-dte">14</span> 日到期;列表与 T 型默认<strong>平值 + 实值3档 + 虚值3档</strong>,勾选「展开全部」看全部行权价。</li>
|
||||
<li>链展示近 <span id="opt-chain-dte">14</span> 日到期;列表与 T 型默认<strong>平值 + 实值3档 + 虚值3档</strong>,勾选「展开全部」看全部行权价(若当前为实值/虚值筛选会自动切回「全部」)。</li>
|
||||
<li>「按可用余额打满」可用额度 = min(交易户可用 USDC, 单笔预算 <strong id="opt-trade-budget">{{ '%.2f'|format(options_trade_budget|default(10)|float) }}</strong>),再 × 预算缓冲 <strong id="opt-budget-buf">{{ '%.2f'|format(options_budget_buffer|default(0.95)|float) }}</strong> 算张数(env 可改)。</li>
|
||||
<li>平仓仅买一限价,详见说明文档。</li>
|
||||
</ul>
|
||||
@@ -324,4 +324,4 @@
|
||||
</div>
|
||||
</div>
|
||||
<script src="/static/options_expiry_countdown.js?v=1"></script>
|
||||
<script src="/static/options_panel.js?v=53"></script>
|
||||
<script src="/static/options_panel.js?v=54"></script>
|
||||
|
||||
Reference in New Issue
Block a user