1. reducePageDataTree = (result: any) => {
    2. return result.map((item: any) => {
    3. if(item.children.length)
    4. {
    5. item.children = this.reducePageDataTree(item.children) // 把子元素的遍历结果传递给item.children中
    6. }
    7. return {...item, key: item.id} // 把修改后的item返回
    8. })
    9. };