formatTree(arr){
const vm = this;
arr.map(item=>{
item.value = item.id;
item.label = item.dataName+'('+item.dataCode+')';
if(Array.isArray(item.children) && item.children.length>0){
vm.formatTree(item.children)
}
})
return arr
},
数组 深度修改
最新推荐文章于 2024-07-23 12:35:43 发布