mirror of
https://github.com/vbenjs/vben-admin-thin-next.git
synced 2025-01-24 02:00:22 +08:00
feat(form): add form field nested support (#591)
* feat(form): add form field nested support * refactor(form): use lodash set replace
This commit is contained in:
parent
4c16ffa383
commit
ec3d51d69b
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user