options: [
{
value: 'zhinan',
label: '指南',
children: [{
value: 'shejiyuanze',
label: '设计原则',
children: []
}, {
value: 'daohang',
label: '导航',
children: []
}]
}
],
cascaderList(){
function fn(arr) {
return arr.map(item => {
if (item.children&&item.children.length > 0) {
fn(item.children)
} else {
delete item.children
}
return item;
})
}
this.options = fn(this.treeMenu);
},