Fix options chain headers mixing list and T-view columns.

Thead rows used a .hidden class with no CSS rule on instance pages, so both header sets stayed visible.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-16 11:57:07 +08:00
parent f0d5b47f50
commit 4c7197ad99
5 changed files with 21 additions and 8 deletions
+4
View File
@@ -3084,6 +3084,10 @@ html[data-theme="light"] .settings-side-export-label {
z-index: 1; z-index: 1;
background: rgba(18, 24, 38, 0.98); background: rgba(18, 24, 38, 0.98);
} }
/* 列表 / T 型表头互斥:类名 hidden 需显式隐藏(实例页无全局 .hidden) */
.options-strike-table thead tr.hidden {
display: none !important;
}
.options-strike-table { .options-strike-table {
width: 100%; width: 100%;
border-collapse: collapse; border-collapse: collapse;
+12 -3
View File
@@ -291,9 +291,18 @@
const headList = document.getElementById("opt-strike-head-list"); const headList = document.getElementById("opt-strike-head-list");
const headT = document.getElementById("opt-strike-head-t"); const headT = document.getElementById("opt-strike-head-t");
const headTCols = document.getElementById("opt-strike-head-t-cols"); const headTCols = document.getElementById("opt-strike-head-t-cols");
if (headList) headList.classList.toggle("hidden", isT); if (headList) {
if (headT) headT.classList.toggle("hidden", !isT); headList.classList.toggle("hidden", isT);
if (headTCols) headTCols.classList.toggle("hidden", !isT); headList.hidden = isT;
}
if (headT) {
headT.classList.toggle("hidden", !isT);
headT.hidden = !isT;
}
if (headTCols) {
headTCols.classList.toggle("hidden", !isT);
headTCols.hidden = !isT;
}
const wrap = document.getElementById("opt-strike-table-wrap"); const wrap = document.getElementById("opt-strike-table-wrap");
if (wrap) wrap.classList.toggle("options-strike-table-wrap--t", isT); if (wrap) wrap.classList.toggle("options-strike-table-wrap--t", isT);
const table = document.getElementById("opt-strike-table"); const table = document.getElementById("opt-strike-table");
+1 -1
View File
@@ -7,7 +7,7 @@
<link rel="stylesheet" href="/static/instance_theme_early.css?v=4"> <link rel="stylesheet" href="/static/instance_theme_early.css?v=4">
<link rel="stylesheet" href="/static/account_risk_badge.css?v=4"> <link rel="stylesheet" href="/static/account_risk_badge.css?v=4">
<link rel="stylesheet" href="/static/instance_page.css?v=6"> <link rel="stylesheet" href="/static/instance_page.css?v=6">
<link rel="stylesheet" href="/static/instance_theme.css?v=92"> <link rel="stylesheet" href="/static/instance_theme.css?v=93">
<script src="/static/account_risk_badge.js?v=4"></script> <script src="/static/account_risk_badge.js?v=4"></script>
<meta name="theme-color" content="#0b0d14"> <meta name="theme-color" content="#0b0d14">
<title>{{ pwa_app_name }}</title> <title>{{ pwa_app_name }}</title>
+1 -1
View File
@@ -17,7 +17,7 @@
<link rel="manifest" href="/static/icons/manifest.webmanifest"> <link rel="manifest" href="/static/icons/manifest.webmanifest">
<title>{{ pwa_app_name }}</title> <title>{{ pwa_app_name }}</title>
<link rel="stylesheet" href="/static/instance_page.css?v=3"> <link rel="stylesheet" href="/static/instance_page.css?v=3">
<link rel="stylesheet" href="/static/instance_theme.css?v=92"> <link rel="stylesheet" href="/static/instance_theme.css?v=93">
</head> </head>
<body <body
+3 -3
View File
@@ -42,12 +42,12 @@
<th>距平衡</th> <th>距平衡</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
<tr id="opt-strike-head-t" class="hidden"> <tr id="opt-strike-head-t" class="hidden" hidden>
<th colspan="3" class="opt-t-head-call">Call</th> <th colspan="3" class="opt-t-head-call">Call</th>
<th colspan="3" class="opt-t-head-mid">跨式</th> <th colspan="3" class="opt-t-head-mid">跨式</th>
<th colspan="3" class="opt-t-head-put">Put</th> <th colspan="3" class="opt-t-head-put">Put</th>
</tr> </tr>
<tr id="opt-strike-head-t-cols" class="hidden"> <tr id="opt-strike-head-t-cols" class="hidden" hidden>
<th>卖一/张</th> <th>卖一/张</th>
<th>类型</th> <th>类型</th>
<th>操作</th> <th>操作</th>
@@ -273,4 +273,4 @@
</div> </div>
</div> </div>
<script src="/static/options_expiry_countdown.js?v=1"></script> <script src="/static/options_expiry_countdown.js?v=1"></script>
<script src="/static/options_panel.js?v=33"></script> <script src="/static/options_panel.js?v=34"></script>