From f7d4e17ae172f34daa12e6cbb13c0e4c6819837f Mon Sep 17 00:00:00 2001 From: twwu Date: Mon, 8 Sep 2025 11:06:35 +0800 Subject: [PATCH] style: improve pointer event handling in PublishToast and Workflow components --- .../rag-pipeline/components/publish-toast.tsx | 4 ++-- web/app/components/workflow/index.tsx | 17 +++++++++-------- .../components/workflow/operator/control.tsx | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/web/app/components/rag-pipeline/components/publish-toast.tsx b/web/app/components/rag-pipeline/components/publish-toast.tsx index 1f89b60e01..10f1e5f79a 100644 --- a/web/app/components/rag-pipeline/components/publish-toast.tsx +++ b/web/app/components/rag-pipeline/components/publish-toast.tsx @@ -18,7 +18,7 @@ const PublishToast = () => { return null return ( -
+
@@ -34,7 +34,7 @@ const PublishToast = () => {
setHideToast(true)} > diff --git a/web/app/components/workflow/index.tsx b/web/app/components/workflow/index.tsx index 658343fb61..1c0c6d4545 100644 --- a/web/app/components/workflow/index.tsx +++ b/web/app/components/workflow/index.tsx @@ -92,6 +92,7 @@ import dynamic from 'next/dynamic' import useMatchSchemaType from './nodes/_base/components/variable/use-match-schema-type' import type { VarInInspect } from '@/types/workflow' import { fetchAllInspectVars } from '@/service/workflow' +import cn from '@/utils/classnames' const Confirm = dynamic(() => import('@/app/components/base/confirm'), { ssr: false, @@ -310,7 +311,7 @@ export const Workflow: FC = memo(({ const [vars, setVars] = useState([]) useEffect(() => { (async () => { - if(!configsMap?.flowType || !configsMap?.flowId) + if (!configsMap?.flowType || !configsMap?.flowId) return const data = await fetchAllInspectVars(configsMap.flowType, configsMap.flowId) setVars(data) @@ -318,7 +319,7 @@ export const Workflow: FC = memo(({ })() }, [configsMap?.flowType, configsMap?.flowId]) useEffect(() => { - if(schemaTypeDefinitions && isLoadedVars) { + if (schemaTypeDefinitions && isLoadedVars) { fetchInspectVars({ passInVars: true, vars, @@ -346,17 +347,17 @@ export const Workflow: FC = memo(({ return (
diff --git a/web/app/components/workflow/operator/control.tsx b/web/app/components/workflow/operator/control.tsx index 7967bf0a6c..cfc32bbc30 100644 --- a/web/app/components/workflow/operator/control.tsx +++ b/web/app/components/workflow/operator/control.tsx @@ -50,7 +50,7 @@ const Control = () => { } return ( -
+