Function convertDataToTree

  • @description: 将list转换为树结构 @author: wxingheng @Date: 2022-09-30 11:37:32

    Parameters

    • data: any[]
    • id: string = 'id'
    • pid: string = 'pid'
    • children: string = 'children'

    Returns any[]

    @example: convertDataToTree(data) => treeData