主要代码
:check-strictly="true"
:check-on-click-node="true"
:expand-on-click-node="false"
<el-tree
:data="deptTree"
:props="defaultProps"
node-key="id"
:current-node-key="defaultId"
default-expand-all="true"
highlight-current
@node-click="handleNodeClick"
:check-strictly="true"
:check-on-click-node="true"
:expand-on-click-node="false"
></el-tree>