mapTree (org) {
const haveChildren = Array.isArray(org.children) && org.children.length > 0;
return {
text: org.title,
value: org.value,
data: {...org},
children: haveChildren ? org.children.map(i => this.mapTree(i)) : []
};
},
async getRegion(){
const res = await getRegion()
console.log(res)
this.localdata = res.data.map(org => this.mapTree(org));
console.log(this.localdata)
},