fix: 切换为非必填时默认空值率 100%

- 必填 → 非必填:默认空值率 100%(始终生成 null)
- 非必填 → 必填:空值率清零
This commit is contained in:
雨霖铃
2026-06-06 19:42:55 +08:00
parent 5a2589cc57
commit 78f5292b00
@@ -33,7 +33,8 @@ export default function FieldEditor({ field, onChange }: FieldEditorProps) {
onChange({
...field,
required,
nullRate: required ? 0 : field.nullRate,
// 切换为必填时清零,切换为非必填时默认 100%
nullRate: required ? 0 : 100,
});
};