From 78f5292b00a528e0d33e7026fb412afb989d49dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E9=9C=96=E9=93=83?= Date: Sat, 6 Jun 2026 19:42:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=87=E6=8D=A2=E4=B8=BA=E9=9D=9E?= =?UTF-8?q?=E5=BF=85=E5=A1=AB=E6=97=B6=E9=BB=98=E8=AE=A4=E7=A9=BA=E5=80=BC?= =?UTF-8?q?=E7=8E=87=20100%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 必填 → 非必填:默认空值率 100%(始终生成 null) - 非必填 → 必填:空值率清零 --- src/pages/TestDataGenerator/components/FieldEditor.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/TestDataGenerator/components/FieldEditor.tsx b/src/pages/TestDataGenerator/components/FieldEditor.tsx index 3f0e253..4241354 100644 --- a/src/pages/TestDataGenerator/components/FieldEditor.tsx +++ b/src/pages/TestDataGenerator/components/FieldEditor.tsx @@ -33,7 +33,8 @@ export default function FieldEditor({ field, onChange }: FieldEditorProps) { onChange({ ...field, required, - nullRate: required ? 0 : field.nullRate, + // 切换为必填时清零,切换为非必填时默认 100% + nullRate: required ? 0 : 100, }); };