@aplus-frontend/ui
Version:
14 lines (13 loc) • 395 B
TypeScript
type ToTreeArrayOptions = {
parentKey?: string;
key?: string;
children?: string;
};
/**
* 将树形结构的表格数据平铺
* @param array 待转换的树形数据
* @param options 配置 缺省配置为{ parentKey: 'parentId', key: 'id', children: 'children' }
* @returns
*/
export declare function toTreeArray(array: any[], options?: ToTreeArrayOptions): any[];
export {};