From 53c59799175e7f134389b187bbf7142f8a21b89d Mon Sep 17 00:00:00 2001 From: nixevol Date: Wed, 16 Sep 2026 17:28:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86=E5=B8=82=E5=9C=BA=E5=8B=BE?= =?UTF-8?q?=E9=80=89=E7=A7=BB=E5=87=BA=E8=A1=A8=E5=8D=95=E4=BB=A5=E4=BE=BF?= =?UTF-8?q?=E5=8D=B3=E6=97=B6=E5=90=AF=E7=94=A8=E6=8C=87=E5=AE=9A=E5=B8=82?= =?UTF-8?q?=E5=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/market_page.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ui/market_page.py b/ui/market_page.py index 3f11b4c..a29b4c9 100644 --- a/ui/market_page.py +++ b/ui/market_page.py @@ -23,11 +23,16 @@ def render(): except (OSError, sqlite3.Error, ValueError) as error: st.warning(f"市场边界不可用:{error}") st.markdown("#### 2 · 选择市场与参数") + # 市场勾选必须放在 form 外,否则取消“全部”后多选框不会立刻解除 disabled。 + all_markets = st.checkbox("处理全部市场", value=True, disabled=not options) + labels = {fid: f"{fid} · {name}" for fid, name in options} + chosen = st.multiselect( + "指定市场", + list(labels), + format_func=labels.get, + disabled=all_markets or not options, + ) with st.form("market_run"): - all_markets = st.checkbox("处理全部市场", value=True) - labels = {fid: f"{fid} · {name}" for fid, name in options} - chosen = st.multiselect("指定市场", list(labels), format_func=labels.get, - disabled=all_markets) c1, c2, c3 = st.columns(3) params["MAX_WORKERS"] = c1.number_input("并行进程数", 1, 16, 4) params["SCALE"] = c2.number_input("分辨率倍数", 0.1, 20.0, 5.0, 0.5)