<el-tree
ref="tree"
:data="treeData"
@check-change="dataCheckChange"
show-checkbox
:props="defaultProps"
:default-checked-keys="defaultcheckedkeys"
:default-expanded-keys="defaultexpandedkeys"
:check-strictly="true"
node-key="id"
></el-tree>
过度数组list
dataCheckChange(data, checked, node) {
let indexs = this.list.indexOf(data.id)
if (indexs < 0 && this.list.length === 1 && checked) {
this. n o t i f y ( t i t l e : ′ 提 示 ′ , m e s s a g e : ′ 只 能 选 择 一