Directly above

The renderings are as follows:

Code:

<el-tree :data="treeData" show-checkbox default-expand-all node-key="id" ref="tree" @node-click="handleTreeClick" :expand-on-click-node="false" :check-strictly="true" highlight-current @check="handleTreeChange" :props="defaultProps" > </el-tree> // method handleTreeChange(data, list) {this.form = data; // temporarily select the node // console.log(data); this.$refs.tree.setCheckedKeys([]); / / delete all the selected node enclosing $refs. Tree. SetCheckedNodes ([. This form]); // Select the selected node},Copy the code

The direct handleTreeChange method allows radio selection