diff --git a/ui/src/workflow/nodes/speech-to-text-node/index.vue b/ui/src/workflow/nodes/speech-to-text-node/index.vue index 5b30970e5..1f1daaf88 100644 --- a/ui/src/workflow/nodes/speech-to-text-node/index.vue +++ b/ui/src/workflow/nodes/speech-to-text-node/index.vue @@ -145,6 +145,7 @@ import { app } from '@/main' import useStore from '@/stores' import NodeCascader from '@/workflow/common/NodeCascader.vue' import type { FormInstance } from 'element-plus' + const { model } = useStore() const { @@ -156,8 +157,12 @@ const modelOptions = ref(null) const providerOptions = 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 }) }) } diff --git a/ui/src/workflow/nodes/text-to-speech-node/index.vue b/ui/src/workflow/nodes/text-to-speech-node/index.vue index a0fa847ed..89042259a 100644 --- a/ui/src/workflow/nodes/text-to-speech-node/index.vue +++ b/ui/src/workflow/nodes/text-to-speech-node/index.vue @@ -172,8 +172,12 @@ const modelOptions = ref(null) const providerOptions = 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 }) }) }