import { DesignTypes } from "../typings"; export declare type DeepPartial = T extends object ? { [P in keyof T]?: DeepPartial; } : T; export declare class Store { constructor(); private store; private oldStore; private initialValues; updateFieldsName: FieldKey[] | any; updateCallBack: () => void; /** * 获取所有的字段 * @returns Partial */ getFields: () => Partial; /** * 获取所有的旧的字段 * @returns Partial */ getOldFields: () => Partial; /** * 根据一个字段名获取值 * @param field 字段名 name * @returns FieldValue */ getFieldValue: (field: FieldKey) => FieldValue; /** * 根据多个字段名获取多个值 * @param fields 多个字段名 * @returns Partial */ getFieldsValue: (fields: FieldKey[]) => Partial; /** * 根据一个字段名获取旧值 * @param field 字段名 name * @returns FieldValue */ getOldFieldValue: (field: FieldKey) => FieldValue; /** * 根据多个字段名获取多个旧值 * @param fields 多个字段名 * @returns Partial */ getOldFieldsValue: (fields: FieldKey[]) => Partial; /** * 更新旧值 */ private updateOldStore; /** * * @param field 字段名 * @param newValue */ setFieldValue: (field: FieldKey, newValue: FieldValue) => void; setFieldsValue: (values: FormData) => void; innerSetFieldValue: (field: FieldKey, newValue: FieldValue) => void; setUpdateCallBack: (updateCallBack: () => void) => void; getUpdateFieldsName: () => any; setStore: (store: Partial) => void; getStore: () => Partial; getOldStore: () => Partial; setInitialValues: (initialValues: Partial) => void; getInitialValues: () => Partial; }