|
@@ -177,10 +177,7 @@ export default defineComponent({
|
|
|
const formatParentId = (id: any, list: any, ids = [] as any) => {
|
|
|
for (const item of list) {
|
|
|
if (item.children && item.children.length > 0) {
|
|
|
- const cIds: any = formatParentId(id, item.children, [
|
|
|
- ...ids,
|
|
|
- item.id
|
|
|
- ]);
|
|
|
+ const cIds: any = formatParentId(id, item.children, [...ids]);
|
|
|
if (cIds.includes(id)) {
|
|
|
return cIds;
|
|
|
}
|