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..e17685212d7 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,16 @@ function handleRangeTimeValue(values: Record) { fieldMappingTime.forEach( ([field, [startTimeKey, endTimeKey], format = 'YYYY-MM-DD']) => { + /** + * 时间字段为空 但是映射的start/end不为空 说明已经清理了组件的时间(组件右边的x) + * 需要删除对应的start/end字段 否则会被保留 + */ + if (!values[field] && values[startTimeKey] && values[endTimeKey]) { + delete values[startTimeKey]; + delete values[endTimeKey]; + return; + } + if (!values[field]) { delete values[field]; return;