export const treeResIdFu = (list: any, id: number) => {
  // 每次进来使用find遍历一次
  let res = list.find((item: any) => item.id === id)

  if (res) {
    return res
  } else {
    for (let i = 0; i < list.length; i++) {
      if (list[i].children instanceof Array && list[i].children.length > 0) {
        res = treeResIdFu(list[i].children, id)

        if (res) return res
      }
    }

    return null
  }
}
