fix: 修复updateSchema之后会把已填值重置为defaultValue的问题 (#1792)

This commit is contained in:
Henry Rao 2022-04-13 19:45:55 +08:00 committed by GitHub
parent 23e0932883
commit b41e3939ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -118,7 +118,10 @@ export function useFormValues({
const { defaultValue } = item;
if (!isNullOrUnDef(defaultValue)) {
obj[item.field] = defaultValue;
formModel[item.field] = defaultValue;
if (formModel[item.field] === undefined) {
formModel[item.field] = defaultValue;
}
}
});
defaultValueRef.value = obj;