treeData: [...]
function loopMuduleTreeDisabled (arr, that) {
arr.forEach((item) => {
that.$set(item, 'disabled', true)
if (item.children && item.children.length > 0) {
loopMuduleTreeDisabled(item.children, that)
}
})
}
loopMuduleTreeDisabled(this.treeData, this)
网友评论