From 26677b193c1360bcb9ecf112c396caf10a1feefe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Fri, 11 Sep 2026 18:56:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=8D=E7=94=A8=E7=95=8C=E9=9D=A2=E6=A0=91?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E8=AE=A1=E6=95=B0=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在同一行中复用组件数量,避免重复计算。 --- .../src/view/ui-editor/components/UiTreePanel.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/ai-game-creator-shell/src/view/ui-editor/components/UiTreePanel.tsx b/apps/ai-game-creator-shell/src/view/ui-editor/components/UiTreePanel.tsx index 0936dbf28..6bba111ce 100644 --- a/apps/ai-game-creator-shell/src/view/ui-editor/components/UiTreePanel.tsx +++ b/apps/ai-game-creator-shell/src/view/ui-editor/components/UiTreePanel.tsx @@ -103,6 +103,7 @@ function TreeRow({ const data = node.data; const nodeLabel = data.metadata.name || '未命名节点'; const isVisible = isNodeVisible(data.id); + const componentCount = data.component ? 1 : 0; return (