Commit 4d479524 authored by tyn's avatar tyn

fix

parent acede891
...@@ -693,15 +693,19 @@ export default { ...@@ -693,15 +693,19 @@ export default {
const item = dataList[index]; const item = dataList[index];
// 返回所在下标index // 返回所在下标index
if (item.id === rowId) { if (item.id === rowId) {
pathArray.push(index); // return `${pathStr}${index}`;
break; return [...pathArray, index].join("");
} }
if (item?.children?.length) { if (item?.children?.length) {
this.getTableTreeProp(item.children, rowId, [`${index}.children.`]); // const childPath = `${pathStr}${index}.children.`;
const childPath = [...pathArray, index, '.children.'];
const result = this.getTableTreeProp(item.children, rowId, childPath);
if (result) {
return result;
}
} }
} }
console.log(pathArray); return null;
return pathArray.join("");
}, },
}, },
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment