mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-27 08:25:07 +00:00
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:
@@ -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
|
||||
]);
|
||||
|
@@ -37,7 +37,8 @@ export const IfElseNode: FlowNodeTemplateType = {
|
||||
{
|
||||
variable: undefined,
|
||||
condition: undefined,
|
||||
value: undefined
|
||||
value: undefined,
|
||||
valueType: 'input'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user