perf(useForm): If the args of the setFieldsValue is empty, it will not be executed. close #3209

This commit is contained in:
invalid w 2023-10-30 12:23:43 +08:00
parent 06a6c947a9
commit 8f900871ac

View File

@ -111,6 +111,10 @@ export function useFormEvents({
* @description: Set form value
*/
async function setFieldsValue(values: Recordable): Promise<void> {
if (Object.keys(values).length === 0) {
return;
}
const fields = getAllFields();
// key 支持 a.b.c 的嵌套写法