// 返回以id组成的数组
deepTraversal(data) {
const result = [];
data.forEach(item => {
const loop = data => {
result.push(data.id);
let child = data.children
if(child){
for(let i = 0; i < child.length; i++){
loop(child[i])
}
}
}
loop(item);
})
return result;
},
let arr = this.deepTraversal(data)