|
@@ -15,13 +15,19 @@
|
|
|
:props="defaultProps"
|
|
|
:expand-on-click-node="false"
|
|
|
highlight-current
|
|
|
+ check-strictly
|
|
|
+ :check-on-click-node="false"
|
|
|
node-key="id"
|
|
|
ref="tree"
|
|
|
- :render-content="renderContent"
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+ @check-change="handleCheckChange"
|
|
|
>
|
|
|
-
|
|
|
+ <span class="custom-tree-node" slot-scope="{node,data}" style="justify-content: flex-start;">
|
|
|
+ <span> <el-checkbox v-model="data.checked" v-if="!data.hasChildren"></el-checkbox></span>
|
|
|
+ {{ node.label }}
|
|
|
+
|
|
|
+ </span>
|
|
|
</el-tree>
|
|
|
|
|
|
</div>
|
|
@@ -130,8 +136,8 @@
|
|
|
});
|
|
|
},
|
|
|
handleCheckChange(checkedNodes) {
|
|
|
-
|
|
|
- console.log('当前选中的节点:',checkedNodes);
|
|
|
+ // 在这里处理已选中的节点数据
|
|
|
+ console.log(checkedNodes,'checkedNodes');
|
|
|
}
|
|
|
|
|
|
}
|