import { PartialDeep } from 'type-fest'; import { Ref } from 'vue'; import { BaseField } from '../field'; import { InternalPath } from '../path'; import { ValueMergeStrategy } from '../utils/value'; import { FieldStore } from './fieldStore'; interface ValueStoreOptions { initialValues: any; onValueChange: (field: BaseField, value: any) => void; } /** * 管理值 */ export declare class ValueStore> { values: Ref; fieldStore: FieldStore; options: ValueStoreOptions; initialValues: Record; constructor(fieldStore: FieldStore, options: ValueStoreOptions); getFieldValue: (path: InternalPath) => any; delete(path: InternalPath): boolean; setFieldValue: (path: InternalPath, value: any) => void; resetFieldValue: (path: InternalPath) => void; resetFieldsValue: () => void; setInitialValue: (path: InternalPath, value: any) => void; setInitialValues: (vals: PartialDeep, strategy?: ValueMergeStrategy) => void; } export declare function createValueStore>(fieldStore: FieldStore, options: ValueStoreOptions): ValueStore; export {};