소스 검색

Merge branch 'hotfix/Form组件setFieldsValue'

shizhongming 2 년 전
부모
커밋
93df04393f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/components/Form/src/hooks/useFormEvents.ts

+ 1 - 1
src/components/Form/src/hooks/useFormEvents.ts

@@ -90,7 +90,7 @@ export function useFormEvents({
 
       // 0| '' is allow
       if (hasKey || !!constructValue) {
-        const fieldValue = constructValue || value;
+        const fieldValue = constructValue && !isFunction(constructValue) ? constructValue : value;
         // time type
         if (itemIsDateType(key)) {
           if (Array.isArray(fieldValue)) {