From 1f4dd3577c223876b31e82517f994a0f78ba94b7 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Thu, 16 Oct 2025 11:09:33 +0800 Subject: [PATCH] fix: Fix the start node cannot be deleted --- ui/src/views/chat/index.vue | 1 - ui/src/workflow/common/shortcut.ts | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ui/src/views/chat/index.vue b/ui/src/views/chat/index.vue index 7584f8225..567ae665f 100644 --- a/ui/src/views/chat/index.vue +++ b/ui/src/views/chat/index.vue @@ -24,7 +24,6 @@ const { } = route as any const currentTemplate = computed(() => { - console.log(common.isMobile()) let modeName = '' if (chatUser.application) { if (!mode || mode === 'pc') { diff --git a/ui/src/workflow/common/shortcut.ts b/ui/src/workflow/common/shortcut.ts index 759abf399..874a825c9 100644 --- a/ui/src/workflow/common/shortcut.ts +++ b/ui/src/workflow/common/shortcut.ts @@ -100,12 +100,12 @@ export function initDefaultShortcut(lf: LogicFlow, graph: GraphModel) { const nodes = elements.nodes.filter((node) => ['start-node', 'base-node', 'loop-body-node'].includes(node.type), ) - // if (nodes.length > 0) { - // MsgError( - // `${nodes[0].properties?.stepName}${t('views.applicationWorkflow.delete.deleteMessage')}`, - // ) - // return - // } + if (nodes.length > 0) { + MsgError( + `${nodes[0].properties?.stepName}${t('views.applicationWorkflow.delete.deleteMessage')}`, + ) + return + } MsgConfirm(t('common.tip'), t('views.applicationWorkflow.delete.confirmTitle'), { confirmButtonText: t('common.confirm'), confirmButtonClass: 'danger',