From 952ad4197c052800cdbbafb70bc3fa85e30bfdba Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Thu, 9 Oct 2025 17:12:49 +0800 Subject: [PATCH] fix: Loop node, MCP node cannot be dragged and added --- ui/src/workflow/index.vue | 2 +- ui/src/workflow/nodes/loop-node/index.vue | 4 ++- ui/src/workflow/nodes/mcp-node/index.vue | 33 ++++++++++++----------- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/ui/src/workflow/index.vue b/ui/src/workflow/index.vue index 2ae4639f124..e78fd5282d7 100644 --- a/ui/src/workflow/index.vue +++ b/ui/src/workflow/index.vue @@ -67,7 +67,6 @@ const renderGraphData = (data?: any) => { }, isSilentMode: false, container: container, - saa: 'sssssss', }) lf.value.setTheme({ bezier: { @@ -129,6 +128,7 @@ const onmousedown = (shapeItem: ShapeItem) => { properties: { ...shapeItem.properties }, }) } + if (shapeItem.callback) { shapeItem.callback(lf.value) } diff --git a/ui/src/workflow/nodes/loop-node/index.vue b/ui/src/workflow/nodes/loop-node/index.vue index 89f3dc3ff49..d05896e7fe5 100644 --- a/ui/src/workflow/nodes/loop-node/index.vue +++ b/ui/src/workflow/nodes/loop-node/index.vue @@ -170,7 +170,9 @@ onMounted(() => { } } set(props.nodeModel, 'validate', validate) - mountLoopBodyNode() + if (!props.nodeModel.virtual) { + mountLoopBodyNode() + } }) diff --git a/ui/src/workflow/nodes/mcp-node/index.vue b/ui/src/workflow/nodes/mcp-node/index.vue index acd6404299f..218c8d0d7f7 100644 --- a/ui/src/workflow/nodes/mcp-node/index.vue +++ b/ui/src/workflow/nodes/mcp-node/index.vue @@ -245,8 +245,8 @@ + -