//utils.jsexportconstcheckList=(list,code,path=[])=>{if(!list)return[]for(constdataoflist){path.push(data.value)if(data.value==code)返回路径if(data.children&&data.children.length){constfindchildren=checkList(data.children,code,path)if(findchildren.length)returnfindchildren}path.pop()}return[]}importuseimport{checkList}from'../utils/utils.js'让arr=checkList(list,code).filter(Boolean)
