Feat: IfElse node support variable reference (#5025)

* if else node support reference (#5016)

* if else node support reference

* optimize input render

* ui

* fix

---------

Co-authored-by: Archer <545436317@qq.com>

* fix: chat

* perf: download invoice

* optimize ifelse node ui (#5024)

* perf: ifelse node

* optimize type (#5027)

---------

Co-authored-by: heheer <heheer@sealos.io>
This commit is contained in:
Archer
2025-06-13 17:15:24 +08:00
committed by GitHub
parent 8acb16f9f2
commit 0914eacb5e
29 changed files with 393 additions and 276 deletions
@@ -4,7 +4,8 @@ import {
NumberInputField,
NumberInputStepper,
NumberDecrementStepper,
type NumberInputProps
type NumberInputProps,
type NumberInputFieldProps
} from '@chakra-ui/react';
import React from 'react';
import MyIcon from '../../Icon';
@@ -16,11 +17,11 @@ type Props = Omit<NumberInputProps, 'onChange' | 'onBlur'> & {
placeholder?: string;
register?: UseFormRegister<any>;
name?: string;
bg?: string;
inputFieldProps?: NumberInputFieldProps;
};
const MyNumberInput = (props: Props) => {
const { register, name, onChange, onBlur, placeholder, bg, ...restProps } = props;
const { register, name, onChange, onBlur, placeholder, inputFieldProps, ...restProps } = props;
return (
<NumberInput
@@ -68,7 +69,6 @@ const MyNumberInput = (props: Props) => {
}}
>
<NumberInputField
bg={bg}
placeholder={placeholder}
h={restProps.h}
defaultValue={restProps.defaultValue}
@@ -80,6 +80,7 @@ const MyNumberInput = (props: Props) => {
valueAsNumber: true
})
: {})}
{...inputFieldProps}
/>
<NumberInputStepper>
<NumberIncrementStepper>