Skip to content

Home > sculp-js > flatTree

flatTree() function

树形结构转扁平化

Signature:

typescript
export declare function flatTree(treeList: any[], options?: IFieldOptions): any[];

Parameters

Parameter

Type

Description

treeList

any[]

options

IFieldOptions

(Optional) 定制id字段名,子元素字段名,父元素字段名,默认 { keyField: 'key', childField: 'children', pidField: 'pid' }

Returns:

any[]

{any[]}

Released under the MIT License.