Feat: Switching the programming language of the code operator will switch the corresponding language template #3221 (#7770)

### What problem does this PR solve?

Feat: Switching the programming language of the code operator will
switch the corresponding language template #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-05-21 18:22:06 +08:00
committed by GitHub
parent 754a5e1cee
commit 558b252c5a
7 changed files with 133 additions and 25 deletions

View File

@ -54,7 +54,10 @@ export function DynamicVariableForm({ node, name = 'arguments' }: IProps) {
<FormItem className="w-2/5">
<FormDescription />
<FormControl>
<Input placeholder={t('common.pleaseInput')} {...field} />
<Input
{...field}
placeholder={t('common.pleaseInput')}
></Input>
</FormControl>
<FormMessage />
</FormItem>
@ -84,7 +87,12 @@ export function DynamicVariableForm({ node, name = 'arguments' }: IProps) {
</div>
);
})}
<Button onClick={append} className="mt-4" variant={'outline'} size={'sm'}>
<Button
onClick={() => append({ name: '', component_id: undefined })}
className="mt-4"
variant={'outline'}
size={'sm'}
>
<Plus />
{t('flow.addVariable')}
</Button>