Function treeArrayToMap

  • 转换treeArray数据为treeMap

    Type Parameters

    Parameters

    • data: T[]

      树形数据

    • keyFieldName: keyof T = 'key'

      子节点id字段名

    • childrenFieldName: keyof T = 'children'

      子节点children字段名

    Returns Map<string | number | symbol, T>