element is the following data format, but all the data returned in the background are nested at the object format level. How do you loop in this?
export default {
data() {
return {
data: [{
label: " 1",
children: [{
label: " 1-1",
children: [{
label: " 1-1-1"
}]
}]
}, {
label: " 2",
children: [{
label: " 2-1",
children: [{
label: " 2-1-1"
}]
}, {
label: " 2-2",
children: [{
label: " 2-2-1"
}]
}]
}, {
label: " 3",
children: [{
label: " 3-1",
children: [{
label: " 3-1-1"
}]
}, {
label: " 3-2",
children: [{
label: " 3-2-1"
}]
}]
}],
defaultProps: {
children: "children",
label: "label"
}
};
}
};