未验证 提交 ec3d51d6 编写于 作者: H HUCHAOQI 提交者: GitHub

feat(form): add form field nested support (#591)

* feat(form): add form field nested support

* refactor(form): use lodash set replace
上级 4c16ffa3
......@@ -5,6 +5,8 @@ import { unref } from 'vue';
import type { Ref, ComputedRef } from 'vue';
import type { FormProps, FormSchema } from '../types/form';
import { set } from 'lodash-es';
interface UseFormValuesContext {
defaultValueRef: Ref<any>;
getSchema: ComputedRef<FormSchema[]>;
......@@ -40,7 +42,7 @@ export function useFormValues({
if (isString(value)) {
value = value.trim();
}
res[key] = value;
set(res, key, value);
}
return handleRangeTimeValue(res);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册