UNPKG

tdesign-react

Version:
13 lines (12 loc) 805 B
import type { FormItemInstance } from '../FormItem'; import type { NamePath } from '../type'; export declare function swap<T>(arr: T[], i: number, j: number): void; export declare function convertNameToArray(name: NamePath): (string | number)[]; export declare function concatName(...name: NamePath[]): (string | number)[]; /** * 在 `formMap` 中查找指定的 `FormItem` * (仅查找当前层级) */ export declare function findFormItem(name: NamePath, formMapRef: React.MutableRefObject<Map<any, any>>): React.RefObject<FormItemInstance> | undefined; export declare function calcFieldValue(name: NamePath, value: any, numericKeyAsIndex?: boolean): any; export declare function travelMapFromObject(obj: Record<any, any>, formMapRef: React.MutableRefObject<Map<any, any>>, callback: Function): void;