From 9788087271fa476e532a0f97d20d02d6118cf0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Sat, 12 Sep 2026 14:47:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BB=84=E4=BB=B6=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E5=A4=B1=E8=B4=A5=E6=97=B6=E7=A1=AE=E8=AE=A4=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E5=8D=A1=E4=BD=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当组件更新返回 undefined 时关闭替换或移除确认弹窗,避免操作无反馈地停留。 --- .../components/Inspector/Components/ComponentPanel.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/ai-game-creator-shell/src/view/ui-editor/components/Inspector/Components/ComponentPanel.tsx b/apps/ai-game-creator-shell/src/view/ui-editor/components/Inspector/Components/ComponentPanel.tsx index 8ce36ca7b..eee3d1d51 100644 --- a/apps/ai-game-creator-shell/src/view/ui-editor/components/Inspector/Components/ComponentPanel.tsx +++ b/apps/ai-game-creator-shell/src/view/ui-editor/components/Inspector/Components/ComponentPanel.tsx @@ -57,12 +57,15 @@ export function ComponentPanel(props: ComponentPanelProps) { if (result?.ok) { setExpanded(true); setReplaceConfirmationOpen(false); + } else if (result === undefined) { + setReplaceConfirmationOpen(false); } } function removeComponent() { const result = setComponent(null); if (result?.ok) setRemoveConfirmationOpen(false); + else if (result === undefined) setRemoveConfirmationOpen(false); } return (