onBusinessSelectChange(selectedKeys, info) { // console.log('selectedKeys changed: ', selectedKeys); // console.log('info changed: ', info); // 已勾选子节点以及半勾选状态的父节点 this.allSelectedNodes = selectedKeys.concat(info.halfCheckedKeys); this.businessSelectedRowKeys = selectedKeys; },
<a-tree showLine checkable v-model='businessSelectedRowKeys' @check="onBusinessSelectChange" :treeData='businessData' :checkedKeys="businessSelectedRowKeys" :autoExpandParent="true" > </a-tree>
data(){ return{ test: [], businessData: [], businessSelectedRowKeys: [], allSelectedNodes: [], } }