v-model: echoed data
Click the header to check the checkbox select event.
<a-tree
v-model="Ids"
style="height: 500px;overflow-y: auto"
checkable
:tree-data="tagTreeData"
:replace-fields="{children:'children', title:'name', key:'id'}"
@select="select"
/>
select:
select(e, ee) {
if (this.Ids.indexOf(ee.node.dataRef.id) !== -1) {
this.Ids = this.Ids.filter(item => item !== ee.node.dataRef.id)
} else {
this.Ids.push(ee.node.dataRef.id)
}
},
Echo: by assigning id to v-model