未验证 提交 c8b16949 编写于 作者: S Sizhu Wang 提交者: GitHub

fix(form): 修复表单fieldMapToTime对应的值为空仍提交原来的字段值 (#2303)

上级 c1d3a943
......@@ -97,7 +97,12 @@ export function useFormValues({
}
for (const [field, [startTimeKey, endTimeKey], format = 'YYYY-MM-DD'] of fieldMapToTime) {
if (!field || !startTimeKey || !endTimeKey || !values[field]) {
if (!field || !startTimeKey || !endTimeKey) {
continue;
}
// If the value to be converted is empty, remove the field
if (!values[field]) {
Reflect.deleteProperty(values, field);
continue;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册