From 8111350709c5d38145f43777545f3e60c577caef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=97=E6=9E=B3?= <7854742+wang_rumeng@user.noreply.gitee.com> Date: Tue, 12 Aug 2025 19:18:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0ScriptRenderer=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E6=96=B0=E5=A2=9Efrom=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E4=BB=A5=E6=94=AF=E6=8C=81=E4=B8=8D=E5=90=8C=E6=9D=A5=E6=BA=90?= =?UTF-8?q?=E7=9A=84=E6=B8=B2=E6=9F=93=E9=80=BB=E8=BE=91=E3=80=82=E5=90=8C?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=9C=A8ScriptTabContent=E4=B8=AD=E8=AE=BE?= =?UTF-8?q?=E7=BD=AEfrom=E5=B1=9E=E6=80=A7=E4=B8=BA'tab'=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=BB=84=E4=BB=B6=E9=97=B4=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=BC=A0=E9=80=92=E5=92=8C=E6=B8=B2=E6=9F=93=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/script-renderer/ScriptRenderer.tsx | 5 +++-- components/ui/script-tab-content.tsx | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/script-renderer/ScriptRenderer.tsx b/components/script-renderer/ScriptRenderer.tsx index 3ae72ad..b4d63df 100644 --- a/components/script-renderer/ScriptRenderer.tsx +++ b/components/script-renderer/ScriptRenderer.tsx @@ -14,9 +14,10 @@ interface ScriptRendererProps { isPauseWorkFlow: boolean; applyScript: any; mode: string; + from: string; } -export const ScriptRenderer: React.FC = ({ data, setIsPauseWorkFlow, setAnyAttribute, isPauseWorkFlow, applyScript, mode }) => { +export const ScriptRenderer: React.FC = ({ data, setIsPauseWorkFlow, setAnyAttribute, isPauseWorkFlow, applyScript, mode, from }) => { const [activeBlockId, setActiveBlockId] = useState(null); const [hoveredBlockId, setHoveredBlockId] = useState(null); const contentRefs = useRef<{ [key: string]: HTMLDivElement | null }>({}); @@ -72,7 +73,7 @@ export const ScriptRenderer: React.FC = ({ data, setIsPause default: return

{ - isInit ? ( + (isInit && from !== 'tab') ? ( ) : ( {content.text} diff --git a/components/ui/script-tab-content.tsx b/components/ui/script-tab-content.tsx index 887c4c8..1cb1e71 100644 --- a/components/ui/script-tab-content.tsx +++ b/components/ui/script-tab-content.tsx @@ -43,6 +43,7 @@ export function ScriptTabContent({ isPauseWorkFlow={isPauseWorkFlow} applyScript={applyScript} mode='manual' + from='tab' />