1 ? 'active' : ''
}`}
>
{fields.length > 1 && (
)}
{fields.map(({ key, name, ...restField }, index) => (
1 ? { width: 'calc(100% - 40px)' } : {}
}
>
{propertyElement(PROPERTIES, { width: 90 })}
{operationElement}
{
const preOperation =
EOperation[
get(prevValues, ['filters', name, 'operation'])
];
const nextOperation =
EOperation[
get(nextValues, ['filters', name, 'operation'])
];
const flag = preOperation !== nextOperation;
if (flag) {
form.setFieldValue(
['filters', name, 'value'],
nextOperation === 'select' ? [] : '',
);
}
return flag;
}}
>
{() => {
const property = form.getFieldValue([
'filters',
index,
'property',
]) as 'status';
const operate = form.getFieldValue([
'filters',
name,
'operation',
]);
return (
{EOperation[operate] === 'select' ? (
statusElement(property)
) : (
)}
);
}}
{index !== 0 && (
remove(name)} />
)}
))}
add({ property: 'command', operation: 'Reg' })
}
>
新增筛选条件
)}