fix: missing action option constraints when reopening linkage rules (#6723)

* fix: missing action option constraints when reopening linkage rules

* fix: bug
This commit is contained in:
Katherine 2025-04-21 09:19:05 +08:00 committed by GitHub
parent b04c26144e
commit 569ae3c110
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 1 deletions

View File

@ -100,6 +100,14 @@ export const ValueDynamicComponent = (props: ValueDynamicComponentProps) => {
.ant-checkbox-wrapper {
margin-left: 50%;
}
.ant-select-selector {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.ant-picker {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
`}
>
{React.createElement(DynamicComponent, {

View File

@ -33,7 +33,12 @@ export const useValues = (options) => {
const dataIndex = field.data?.targetFields;
const option = (dataIndex && findOption(dataIndex, options)) || {};
const operators = option?.operators || [];
field.data.operators = operators;
field.data.operators = operators?.filter((v) => {
if (dataIndex.length > 1) {
return v.value !== 'value';
}
return true;
});
field.data.schema = option?.schema;
};
useEffect(value2data, [logic]);