toTreeArray.d.ts 698 B

123456789101112131415161718192021222324252627
  1. import { XEUtilsMethods } from '../xe-utils'
  2. export interface ToTreeArrayOptions {
  3. children?: string;
  4. data?: string;
  5. clear?: boolean;
  6. }
  7. /**
  8. * 将一个树结构转成数组列表
  9. * @param {Array} array 数组
  10. * @param {Object} options {children: 'children', data: 'data', clear: false}
  11. */
  12. export declare function toTreeArray(array: any[], options?: ToTreeArrayOptions): any[];
  13. declare module '../xe-utils' {
  14. interface XEUtilsMethods {
  15. /**
  16. * 将一个树结构转成数组列表
  17. * @param {Array} array 数组
  18. * @param {Object} options {children: 'children', data: 'data', clear: false}
  19. */
  20. toTreeArray: typeof toTreeArray;
  21. }
  22. }
  23. export default toTreeArray