fix: 切换为非必填时默认空值率 100%
- 必填 → 非必填:默认空值率 100%(始终生成 null) - 非必填 → 必填:空值率清零
This commit is contained in:
@@ -33,7 +33,8 @@ export default function FieldEditor({ field, onChange }: FieldEditorProps) {
|
|||||||
onChange({
|
onChange({
|
||||||
...field,
|
...field,
|
||||||
required,
|
required,
|
||||||
nullRate: required ? 0 : field.nullRate,
|
// 切换为必填时清零,切换为非必填时默认 100%
|
||||||
|
nullRate: required ? 0 : 100,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user