|
|
@ -4,7 +4,12 @@ import type { NamePath } from 'ant-design-vue/lib/form/interface'; |
|
|
import { unref, toRaw, nextTick } from 'vue'; |
|
|
import { unref, toRaw, nextTick } from 'vue'; |
|
|
import { isArray, isFunction, isObject, isString, isDef, isNil } from '@/utils/is'; |
|
|
import { isArray, isFunction, isObject, isString, isDef, isNil } from '@/utils/is'; |
|
|
import { deepMerge } from '@/utils'; |
|
|
import { deepMerge } from '@/utils'; |
|
|
import { dateItemType, handleInputNumberValue, defaultValueComponents } from '../helper'; |
|
|
import { |
|
|
|
|
|
dateItemType, |
|
|
|
|
|
handleInputNumberValue, |
|
|
|
|
|
defaultValueComponents, |
|
|
|
|
|
isIncludeSimpleComponents, |
|
|
|
|
|
} from '../helper'; |
|
|
import { dateUtil } from '@/utils/dateUtil'; |
|
|
import { dateUtil } from '@/utils/dateUtil'; |
|
|
import { cloneDeep, set, uniqBy, get } from 'lodash-es'; |
|
|
import { cloneDeep, set, uniqBy, get } from 'lodash-es'; |
|
|
import { error } from '@/utils/log'; |
|
|
import { error } from '@/utils/log'; |
|
|
@ -245,7 +250,8 @@ export function useFormEvents({ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const hasField = updateData.every( |
|
|
const hasField = updateData.every( |
|
|
(item) => item.component === 'Divider' || (Reflect.has(item, 'field') && item.field), |
|
|
(item) => |
|
|
|
|
|
isIncludeSimpleComponents(item.component) || (Reflect.has(item, 'field') && item.field), |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
if (!hasField) { |
|
|
if (!hasField) { |
|
|
@ -267,7 +273,8 @@ export function useFormEvents({ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const hasField = updateData.every( |
|
|
const hasField = updateData.every( |
|
|
(item) => item.component === 'Divider' || (Reflect.has(item, 'field') && item.field), |
|
|
(item) => |
|
|
|
|
|
isIncludeSimpleComponents(item.component) || (Reflect.has(item, 'field') && item.field), |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
if (!hasField) { |
|
|
if (!hasField) { |
|
|
@ -309,7 +316,7 @@ export function useFormEvents({ |
|
|
const currentFieldsValue = getFieldsValue(); |
|
|
const currentFieldsValue = getFieldsValue(); |
|
|
schemas.forEach((item) => { |
|
|
schemas.forEach((item) => { |
|
|
if ( |
|
|
if ( |
|
|
item.component != 'Divider' && |
|
|
!isIncludeSimpleComponents(item.component) && |
|
|
Reflect.has(item, 'field') && |
|
|
Reflect.has(item, 'field') && |
|
|
item.field && |
|
|
item.field && |
|
|
!isNil(item.defaultValue) && |
|
|
!isNil(item.defaultValue) && |
|
|
|