refactor: Update AddFlowVariableModal to include hover effect on variable fields

This commit is contained in:
谨欣 2024-09-05 01:41:44 +08:00
parent 104b7d0e65
commit 4d4aac47ac

View File

@ -200,7 +200,7 @@ export const AddFlowVariableModal: React.FC<Props> = ({ flowInfo, setFlowInfo })
{(fields, { add, remove }) => (
<>
{fields.map(({ key, name, ...restField }, index) => (
<Space key={key}>
<Space key={key} className='hover:bg-gray-100 pt-2 pl-2'>
<Form.Item
{...restField}
name={[name, 'name']}
@ -257,11 +257,11 @@ export const AddFlowVariableModal: React.FC<Props> = ({ flowInfo, setFlowInfo })
<Input placeholder='Parameter Description' />
</Form.Item>
<MinusCircleOutlined onClick={() => remove(name)} />
<Form.Item name={[name, 'key']} hidden initialValue='dbgpt.core.flow.params' />
<Form.Item name={[name, 'scope']} hidden initialValue='flow_priv' />
<Form.Item name={[name, 'category']} hidden initialValue='common' />
<MinusCircleOutlined onClick={() => remove(name)} />
</Space>
))}