From c8852ac2af93ac502619f9da4299d54714985a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Thu, 24 Sep 2026 16:10:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=8A=E5=8F=AA=E8=B5=8B=E5=80=BC=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E7=9A=84=20overview=20=E6=94=B9=E6=88=90=20const=20?= =?UTF-8?q?=E4=B8=89=E5=85=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/view/ui-editor/index.tsx 用三元表达式声明 overview,去掉 let + if/else 两处赋值,表达不可变意图 --- .../ai-game-creator-shell/src/view/ui-editor/index.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/apps/ai-game-creator-shell/src/view/ui-editor/index.tsx b/apps/ai-game-creator-shell/src/view/ui-editor/index.tsx index a59a16b3b..fd5f9c776 100644 --- a/apps/ai-game-creator-shell/src/view/ui-editor/index.tsx +++ b/apps/ai-game-creator-shell/src/view/ui-editor/index.tsx @@ -79,9 +79,8 @@ export default function UiEditorPage({ const [showFrame, setShowFrame] = useState(true); const [showOriginImage, setShowOriginImage] = useState(true); const [showComponent, setShowComponent] = useState(false); - let overview: ReactNode; - if (session.input.activeStep === 'structure-recognition') { - overview = ( + const overview: ReactNode = + session.input.activeStep === 'structure-recognition' ? ( { @@ -89,9 +88,7 @@ export default function UiEditorPage({ session.input.highlightStatusField(nodeId, 'layout_status'); }} /> - ); - } else { - overview = ( + ) : ( ); - } const saveDisabled = session.save.isSaving || session.save.isGenerating ||