From 5f39448f7485415affddf31cd31fd2c6941802aa Mon Sep 17 00:00:00 2001 From: ZLY Date: Thu, 25 Sep 2025 16:41:02 +0800 Subject: [PATCH] =?UTF-8?q?pref(flowEditor):=20=E4=BC=98=E5=8C=96=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E5=90=8E=E7=9A=84=E6=8F=90=E7=A4=BA=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/flowEditor/index.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/pages/flowEditor/index.tsx b/src/pages/flowEditor/index.tsx index 41fdc8b..6f8048a 100644 --- a/src/pages/flowEditor/index.tsx +++ b/src/pages/flowEditor/index.tsx @@ -35,6 +35,7 @@ import { defaultNodeTypes } from '@/components/FlowEditor/node/types/defaultType import { localNodeData } from '@/pages/flowEditor/sideBar/config/localNodeData'; import { useAlignmentGuidelines } from '@/hooks/useAlignmentGuidelines'; import { setMainFlow } from '@/api/appRes'; +import { Message } from '@arco-design/web-react'; const edgeTypes: EdgeTypes = { custom: CustomEdge @@ -604,10 +605,16 @@ const FlowEditor: React.FC<{ initialData?: any }> = ({ initialData }) => { // 转换会原始数据类型 const revertedData = revertFlowData(nodes, edges); - const res = await setMainFlow(revertedData, initialData.id); + const res: any = await setMainFlow(revertedData, initialData.id); + if (res.code === 200) { + Message.success('保存成功'); + } + else { + Message.error(res.message); + } } catch (error) { console.error('Error saving flow data:', error); - // 可以添加错误提示 + Message.error(error); } }, [nodes, edges]);