The last level children is recursively set to undefined

Commonapi.officetree (). Then (resp => {if (resp.status === 'SUCCEED') {let data = resp.result; this.getTypeList(data); this.conpanyOptions = data; ForEach (items => {if (items.children.length > 0) {if (items.children.length > 0) { this.getTypeList(items.children); } else { items.children = undefined; }}); },Copy the code