From 4c7197ad9980b1fb3bf55cafae45d67ae00faf15 Mon Sep 17 00:00:00 2001 From: dekun Date: Thu, 16 Jul 2026 11:57:07 +0800 Subject: [PATCH] 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 --- lib/common/static/instance_theme.css | 4 ++++ lib/common/static/options_panel.js | 15 ++++++++++++--- lib/instance/templates/embed_shell.html | 2 +- lib/instance/templates/index.html | 2 +- lib/options/templates/options_panel.html | 6 +++--- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/lib/common/static/instance_theme.css b/lib/common/static/instance_theme.css index cacb6c0..3d2084b 100644 --- a/lib/common/static/instance_theme.css +++ b/lib/common/static/instance_theme.css @@ -3084,6 +3084,10 @@ html[data-theme="light"] .settings-side-export-label { z-index: 1; background: rgba(18, 24, 38, 0.98); } +/* 列表 / T 型表头互斥:类名 hidden 需显式隐藏(实例页无全局 .hidden) */ +.options-strike-table thead tr.hidden { + display: none !important; +} .options-strike-table { width: 100%; border-collapse: collapse; diff --git a/lib/common/static/options_panel.js b/lib/common/static/options_panel.js index 679b722..75422dc 100644 --- a/lib/common/static/options_panel.js +++ b/lib/common/static/options_panel.js @@ -291,9 +291,18 @@ const headList = document.getElementById("opt-strike-head-list"); const headT = document.getElementById("opt-strike-head-t"); const headTCols = document.getElementById("opt-strike-head-t-cols"); - if (headList) headList.classList.toggle("hidden", isT); - if (headT) headT.classList.toggle("hidden", !isT); - if (headTCols) headTCols.classList.toggle("hidden", !isT); + if (headList) { + headList.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"); if (wrap) wrap.classList.toggle("options-strike-table-wrap--t", isT); const table = document.getElementById("opt-strike-table"); diff --git a/lib/instance/templates/embed_shell.html b/lib/instance/templates/embed_shell.html index 121598d..b403a05 100644 --- a/lib/instance/templates/embed_shell.html +++ b/lib/instance/templates/embed_shell.html @@ -7,7 +7,7 @@ - + {{ pwa_app_name }} diff --git a/lib/instance/templates/index.html b/lib/instance/templates/index.html index 939f765..e937522 100644 --- a/lib/instance/templates/index.html +++ b/lib/instance/templates/index.html @@ -17,7 +17,7 @@ {{ pwa_app_name }} - + 距平衡 操作 - + Call 跨式 Put - + 卖一/张 类型 操作 @@ -273,4 +273,4 @@ - +