From c2dfda80f606b4fa333588cb91749e11c5d6c327 Mon Sep 17 00:00:00 2001 From: Amy0104 <97265214+Amy0104@users.noreply.github.com> Date: Thu, 14 Jul 2022 10:15:25 +0800 Subject: [PATCH] [Fix][UI] Set the next node to not required. (#10932) * [Fix][UI] Set the next node to not required. * [Fix][UI] Remove the unuse i --- .../task/components/node/fields/use-switch.ts | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-switch.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-switch.ts index ebc050250e..d4e1453124 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-switch.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-switch.ts @@ -104,20 +104,13 @@ export function useSwitch( autosize: { minRows: 2 } } }, - (i = 0) => ({ + { type: 'select', field: 'nextNode', span: 22, name: t('project.node.switch_branch_flow'), - options: branchFlowOptions, - validate: { - trigger: ['input', 'blur'], - validator: (unuse: any, value: string) => { - if (model.dependTaskList[i].condition && !value) - return new Error(t('project.node.switch_branch_flow_tips')) - } - } - }) + options: branchFlowOptions + } ] }, { @@ -128,12 +121,7 @@ export function useSwitch( props: { loading: loading }, - options: branchFlowOptions, - validate: { - trigger: ['input', 'blur'], - required: true, - message: t('project.node.switch_branch_flow_tips') - } + options: branchFlowOptions } ] }