From 4920e8787b0926dd8a18366a718d8cb0412a55c3 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Mon, 23 Dec 2024 16:18:33 +0800 Subject: [PATCH] fix: Image understanding of non-existent variable prompts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1050722 --user=刘瑞斌 【应用编排】前置节点删掉后,调试和发布的时候引用前置节点的变量要有提示 https://www.tapd.cn/57709429/s/1635604 --- ui/src/workflow/nodes/image-understand/index.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/src/workflow/nodes/image-understand/index.vue b/ui/src/workflow/nodes/image-understand/index.vue index 40f23847c..f2a5e70d9 100644 --- a/ui/src/workflow/nodes/image-understand/index.vue +++ b/ui/src/workflow/nodes/image-understand/index.vue @@ -221,8 +221,12 @@ const providerOptions = ref>([]) const AIModeParamSettingDialogRef = ref>() const aiChatNodeFormRef = ref() +const nodeCascaderRef = ref() const validate = () => { - return aiChatNodeFormRef.value?.validate().catch((err) => { + return Promise.all([ + nodeCascaderRef.value ? nodeCascaderRef.value.validate() : Promise.resolve(''), + aiChatNodeFormRef.value?.validate() + ]).catch((err: any) => { return Promise.reject({ node: props.nodeModel, errMessage: err }) }) }