Change the state of a node to 'open' to expand and 'closed' to collapse it.
expand() {
this.data[0].children.forEach(node=>{
this.$set(node,'state','open');
})
},
collapse(){
this.data[0].children.forEach(node=>{
this.$set(node,'state','closed');
})
},