From 94c68c966eb9646b36baa7b561c15a03a966c52e Mon Sep 17 00:00:00 2001 From: huangxiaomin Date: Sun, 17 Nov 2024 21:04:04 +0800 Subject: [PATCH] fix: fieldMappingTime data error when clear inputvalue (#4906) --- .../@core/ui-kit/form-ui/src/components/form-actions.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/@core/ui-kit/form-ui/src/components/form-actions.vue b/packages/@core/ui-kit/form-ui/src/components/form-actions.vue index 0a713567fa1..26e426fe55f 100644 --- a/packages/@core/ui-kit/form-ui/src/components/form-actions.vue +++ b/packages/@core/ui-kit/form-ui/src/components/form-actions.vue @@ -91,6 +91,11 @@ function handleRangeTimeValue(values: Record) { fieldMappingTime.forEach( ([field, [startTimeKey, endTimeKey], format = 'YYYY-MM-DD']) => { + if (startTimeKey && endTimeKey && values[field] === null) { + delete values[startTimeKey]; + delete values[endTimeKey]; + } + if (!values[field]) { delete values[field]; return;