Browse Source

fix(Form组件): 修复form组件setFieldsValue,setFieldsValue({date: dayjs() }) 会报错问题

shizhongming 2 years ago
parent
commit
ed9571842a
  1. 2
      src/components/Form/src/hooks/useFormEvents.ts

2
src/components/Form/src/hooks/useFormEvents.ts

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

Loading…
Cancel
Save