From ebf5396ff23ab2e1c62a1ea8d37b830bb593ebc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=94=E6=A2=A6?= Date: Wed, 15 Jan 2025 15:09:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=9D=A1=E4=BB=B6=E8=8A=82=E7=82=B9+?= =?UTF-8?q?=E5=B9=B6=E8=A1=8C=E8=8A=82=E7=82=B9=E5=8E=BB=E6=8E=89=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/nodes/node-parallel/ParallelBuildInNodeWidget.tsx | 7 +++---- .../src/nodes/node-switch/SwitchBuildInNodeWidget.tsx | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/x-flow/src/nodes/node-parallel/ParallelBuildInNodeWidget.tsx b/packages/x-flow/src/nodes/node-parallel/ParallelBuildInNodeWidget.tsx index bc570ec94..cad691365 100644 --- a/packages/x-flow/src/nodes/node-parallel/ParallelBuildInNodeWidget.tsx +++ b/packages/x-flow/src/nodes/node-parallel/ParallelBuildInNodeWidget.tsx @@ -37,10 +37,9 @@ export default memo((props: any) => { const renderTitle = (item, index) => { const defTitle = item?.title || `事件${index}`; - // const title = parallelExtra?.titleKey - // ? item[parallelExtra?.titleKey] - // : defTitle; - const title = item[parallelExtra?.titleKey] ?? defTitle; + const title = parallelExtra?.titleKey + ? item[parallelExtra?.titleKey] + : defTitle; return (
diff --git a/packages/x-flow/src/nodes/node-switch/SwitchBuildInNodeWidget.tsx b/packages/x-flow/src/nodes/node-switch/SwitchBuildInNodeWidget.tsx index c5ed2d13f..22564fc7f 100644 --- a/packages/x-flow/src/nodes/node-switch/SwitchBuildInNodeWidget.tsx +++ b/packages/x-flow/src/nodes/node-switch/SwitchBuildInNodeWidget.tsx @@ -32,10 +32,9 @@ export default memo((props: any) => { const renderTitle = (item, index) => { const defTitle = item?.title || `条件${index}`; - // const title = switchExtra?.titleKey - // ? item[switchExtra?.titleKey] - // : defTitle; - const title = item[switchExtra?.titleKey] ?? defTitle; + const title = switchExtra?.titleKey + ? item[switchExtra?.titleKey] + : defTitle; return (
{title}