网站首页
编程语言
数据库
系统相关
其他分享
编程问答
childrenProp
2024-07-01
获取所有的叶子节点
获取所有的叶子节点/***获取叶子节点*@paramtree*@paramoptions*@returns{*[]}*/exportfunctiongetLeafNodes(tree,options={}){ const{childrenProp='children'}=options//默认子节点属性名为'children' constleafNodes=[] functio