:data="data"
node-key="id"
default-expand-all
:expand-on-click-node="false"
:render-content="renderContent"
>
updateChange(e, node, data) {
const isChecked = e.path[0].checked
const arr = []
this.$set(data, 'isChecked', isChecked)
arr.push(data.label)
node.childNodes.map(res => {
this.$set(res.data, 'isChecked', isChecked)
arr.push(res.data.label)
})
arr.map(item => {
if (isChecked) {
this.checkList.push(item)
} else {
const i = this.checkList.indexOf(item)
i > -1 && this.checkList.splice(i, 1)
}
})
this.checkList = [... new Set(this.checkList)]
console.log(this.checkList)
}