File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
ui/src/workflow/nodes/image-understand Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,7 @@ import applicationApi from '@/api/application'
193193import { app } from ' @/main'
194194import useStore from ' @/stores'
195195import NodeCascader from ' @/workflow/common/NodeCascader.vue'
196+ import type { FormInstance } from ' element-plus'
196197
197198const { model } = useStore ()
198199
@@ -204,6 +205,12 @@ const props = defineProps<{ nodeModel: any }>()
204205const modelOptions = ref <any >(null )
205206const providerOptions = ref <Array <Provider >>([])
206207
208+ const aiChatNodeFormRef = ref <FormInstance >()
209+ const validate = () => {
210+ return aiChatNodeFormRef .value ?.validate ().catch ((err ) => {
211+ return Promise .reject ({ node: props .nodeModel , errMessage: err })
212+ })
213+ }
207214
208215const wheel = (e : any ) => {
209216 if (e .ctrlKey === true ) {
@@ -277,6 +284,8 @@ function submitDialog(val: string) {
277284onMounted (() => {
278285 getModel ()
279286 getProvider ()
287+
288+ set (props .nodeModel , ' validate' , validate )
280289})
281290
282291 </script >
You can’t perform that action at this time.
0 commit comments