From b5b1a98bc4c2a23040fb1def53462f1e47809307 Mon Sep 17 00:00:00 2001 From: zhaoying Date: Tue, 20 Jan 2026 16:10:49 +0800 Subject: [PATCH] fix(web): when the type of the loop variable is number, value uses InputNumber --- .../Properties/CycleVarsList/index.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/web/src/views/Workflow/components/Properties/CycleVarsList/index.tsx b/web/src/views/Workflow/components/Properties/CycleVarsList/index.tsx index 13e00ea2..9e28c958 100644 --- a/web/src/views/Workflow/components/Properties/CycleVarsList/index.tsx +++ b/web/src/views/Workflow/components/Properties/CycleVarsList/index.tsx @@ -1,6 +1,6 @@ import { type FC } from 'react' import { useTranslation } from 'react-i18next'; -import { Form, Select, Input, Button } from 'antd' +import { Form, Select, Input, Button, InputNumber } from 'antd' import VariableSelect from '../VariableSelect' import type { Suggestion } from '../../Editor/plugin/AutocompletePlugin' @@ -93,6 +93,7 @@ const CycleVarsList: FC = ({ {fields.map(({ key, name }, index) => { + const currentType = value?.[index]?.type; const currentInputType = value?.[index]?.input_type; return ( @@ -131,7 +132,8 @@ const CycleVarsList: FC = ({ - {currentInputType === 'variable' ? ( + {currentInputType === 'variable' + ? ( { @@ -143,7 +145,15 @@ const CycleVarsList: FC = ({ variant="borderless" size="small" /> - ) : ( + ) + : currentType === 'number' + ? form.setFieldValue([name, 'value'], value)} + /> + : (