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

View File

@@ -113,3 +113,15 @@ export const allConditionList = [
value: VariableConditionEnum.lengthLessThanOrEqualTo
}
];
export const renderNumberConditionList = new Set<VariableConditionEnum>([
VariableConditionEnum.greaterThan,
VariableConditionEnum.greaterThanOrEqualTo,
VariableConditionEnum.lessThan,
VariableConditionEnum.lessThanOrEqualTo,
VariableConditionEnum.lengthEqualTo,
VariableConditionEnum.lengthNotEqualTo,
VariableConditionEnum.lengthGreaterThan,
VariableConditionEnum.lengthGreaterThanOrEqualTo,
VariableConditionEnum.lengthLessThan,
VariableConditionEnum.lengthLessThanOrEqualTo
]);

View File

@@ -37,7 +37,8 @@ export const IfElseNode: FlowNodeTemplateType = {
{
variable: undefined,
condition: undefined,
value: undefined
value: undefined,
valueType: 'input'
}
]
}

View File

@@ -5,7 +5,8 @@ export type IfElseConditionType = 'AND' | 'OR';
export type ConditionListItemType = {
variable?: ReferenceItemValueType;
condition?: VariableConditionEnum;
value?: string;
value?: string | ReferenceItemValueType;
valueType?: 'input' | 'reference';
};
export type IfElseListItemType = {
condition: IfElseConditionType;