NuclearDispersionSystem/ant-design-vue-jeecg/node_modules/xe-utils/methods/array/mapTree.d.ts

32 lines
1.1 KiB
TypeScript
Raw Normal View History

2023-09-14 14:47:11 +08:00
import { XEUtilsMethods } from '../xe-utils'
export declare function mapTreeIterate(item: any, index: number, items: any[], path: string[], parent: any, nodes: any[]): any;
interface MapTreeOptions {
children?: string;
mapChildren?: string;
}
/**
*
* @param {Object} obj /
* @param {Function} iterate(item, index, items, path, parent, nodes)
* @param {Object} options {children: 'children', mapChildren: 'children}
* @param {Object} context
*/
export declare function mapTree(array: any[], iterate: typeof mapTreeIterate, options?: MapTreeOptions, context?: any): any[];
declare module '../xe-utils' {
interface XEUtilsMethods {
/**
*
* @param {Object} obj /
* @param {Function} iterate(item, index, items, path, parent, nodes)
* @param {Object} options {children: 'children', mapChildren: 'children}
* @param {Object} context
*/
mapTree: typeof mapTree;
}
}
export default mapTree