const getItem = function (tree, ID) {
    var Deep, T, F;
    for (F = tree.length; F;) {
        T = tree[--F]
        if (ID == T.id) return T;
        if (T.children) {
            Deep = getDepById(T.children, ID)
            if (Deep) return Deep
        }
    }
}

  

相关文章:

  • 2021-12-10
  • 2022-01-11
  • 2022-12-23
  • 2022-12-23
  • 2022-03-05
  • 2021-11-23
  • 2021-12-27
猜你喜欢
  • 2022-12-23
  • 2021-11-14
  • 2021-05-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案