fix(web): update interface type
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-09 18:24:53
|
* @Date: 2026-02-09 18:24:53
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-04-17 19:48:59
|
* @Last Modified time: 2026-04-17 19:58:13
|
||||||
*/
|
*/
|
||||||
import { useEffect, useMemo, type FC } from 'react'
|
import { useEffect, useMemo, type FC } from 'react'
|
||||||
import clsx from 'clsx'
|
import clsx from 'clsx'
|
||||||
@@ -45,7 +45,7 @@ interface CaseItem {
|
|||||||
}
|
}
|
||||||
interface CaseListProps {
|
interface CaseListProps {
|
||||||
value?: CaseItem[];
|
value?: CaseItem[];
|
||||||
onChange?: (value: Array<{ logical_operator: 'and' | 'or'; expressions: { left: string; operator: string; right: string; }[] }>) => void;
|
onChange?: (value: CaseItem[]) => void;
|
||||||
options: Suggestion[];
|
options: Suggestion[];
|
||||||
name: string;
|
name: string;
|
||||||
selectedNode?: any;
|
selectedNode?: any;
|
||||||
@@ -221,7 +221,7 @@ const ArrayFileSubConditions: FC<ArrayFileSubConditionsProps> = ({ conditionFiel
|
|||||||
onChange={(value: string) => {
|
onChange={(value: string) => {
|
||||||
form.setFieldValue([name, caseIndex, 'expressions', conditionIndex, 'sub_variable_condition', 'conditions', subIndex], {
|
form.setFieldValue([name, caseIndex, 'expressions', conditionIndex, 'sub_variable_condition', 'conditions', subIndex], {
|
||||||
key: value,
|
key: value,
|
||||||
input_type: value === 'size' ? 'Constant' : undefined,
|
input_type: value === 'size' ? 'constant' : undefined,
|
||||||
value: undefined,
|
value: undefined,
|
||||||
operator: value === 'size' ? 'ge' : 'eq',
|
operator: value === 'size' ? 'ge' : 'eq',
|
||||||
});
|
});
|
||||||
@@ -488,7 +488,7 @@ const CaseList: FC<CaseListProps> = ({
|
|||||||
left: newValue,
|
left: newValue,
|
||||||
operator: undefined,
|
operator: undefined,
|
||||||
right: undefined,
|
right: undefined,
|
||||||
input_type: 'Constant'
|
input_type: 'constant'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user