树形数据中,根据某一节点id查找这个id所在的完整路径。
树形数据中,根据某一节点id查找这个id所在的完整路径。
调用:
const resList = this.findIndexArray(this.treeCategoryOptions, item.category._id, []);
this.treeCategoryOptions
: 树形数据数组item.category._id
: 要查找的id
调用:
const resList = this.findIndexArray(this.treeCategoryOptions, item.category._id, []);
this.treeCategoryOptions
: 树形数据数组item.category._id
: 要查找的id