fix 完善handleTree方法

This commit is contained in:
yxh 2025-06-25 21:41:53 +08:00
parent 9deae50ccc
commit 68648f2a86

View File

@ -45,6 +45,9 @@ export function handleTree(data:any[], id:string, parentId:string, children:stri
rootIds.push(item[parentId]) rootIds.push(item[parentId])
} }
}) })
}else if(typeof rootId ==='string'){
rootId = rootId || ''
rootIds = [rootId]
}else{ }else{
rootId = rootId || 0 rootId = rootId || 0
rootIds = [rootId] rootIds = [rootId]