From b8ed0f8177604d98e397bf6fba78ca814d07d8a1 Mon Sep 17 00:00:00 2001 From: shy3130 <415333856@qq.com> Date: Fri, 26 Jun 2026 16:26:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(analysis):=20=E6=96=B0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=97=A0=E6=95=B0=E6=8D=AE=E6=97=B6=E6=A6=82=E5=BF=B5/?= =?UTF-8?q?=E8=A1=8C=E4=B8=9A=E5=88=86=E6=9E=90=E9=85=8D=E7=BD=AE=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=97=A0=E5=93=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:配置弹窗 在主 return 内,而无数据的早期 return 分支没有渲染弹窗,导致新用户点按钮 showConfig=true 无组件响应。 - ConceptAnalysis: 早期 return 分支补上弹窗渲染 - IndustryAnalysis: 早期 return 分支补上配置按钮(原来缺失)+弹窗渲染 修复后新用户在两个页面点配置按钮均可正常弹出。 --- frontend/src/pages/ConceptAnalysis.tsx | 27 +++++++++++++++---------- frontend/src/pages/IndustryAnalysis.tsx | 20 ++++++++++++++---- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/frontend/src/pages/ConceptAnalysis.tsx b/frontend/src/pages/ConceptAnalysis.tsx index ba686e9..fd8829a 100644 --- a/frontend/src/pages/ConceptAnalysis.tsx +++ b/frontend/src/pages/ConceptAnalysis.tsx @@ -311,17 +311,22 @@ export function ConceptAnalysis() { if (!activeConfig) { return ( -
- setShowConfig(true)} className="p-1.5 text-muted hover:bg-surface hover:text-accent" title="配置数据源"> - - - } - /> - -
+ <> +
+ setShowConfig(true)} className="p-1.5 text-muted hover:bg-surface hover:text-accent" title="配置数据源"> + + + } + /> + +
+ + {showConfig && setShowConfig(false)} />} + + ) } diff --git a/frontend/src/pages/IndustryAnalysis.tsx b/frontend/src/pages/IndustryAnalysis.tsx index 6b86e6d..c941c08 100644 --- a/frontend/src/pages/IndustryAnalysis.tsx +++ b/frontend/src/pages/IndustryAnalysis.tsx @@ -358,10 +358,22 @@ export function IndustryAnalysis() { if (!activeConfig) { return ( -
- - -
+ <> +
+ setShowConfig(true)} className="p-1.5 text-muted hover:bg-surface hover:text-accent" title="配置数据源"> + + + } + /> + +
+ + {showConfig && setShowConfig(false)} showHierarchyLevel />} + + ) }