功能选择按钮修改
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
:props="defaultProps"
|
||||
node-key="id"
|
||||
default-expand-all
|
||||
:default-checked-keys="defaultChecked"
|
||||
@node-click="handleNodeClick"
|
||||
>
|
||||
</el-tree>
|
||||
@@ -24,13 +25,16 @@ const data: any = ref([]);
|
||||
const defaultProps = {
|
||||
children: "children",
|
||||
label: "name",
|
||||
pid:"pid",
|
||||
};
|
||||
const searchForm = ref({
|
||||
planName: "",
|
||||
});
|
||||
const defaultChecked=ref([])
|
||||
const getTreeData = (val: any) => {
|
||||
console.log(val, ",,,,");
|
||||
defaultChecked.value=[]
|
||||
data.value = val;
|
||||
defaultChecked.value.push(data.value[0].children[0].id)
|
||||
};
|
||||
const filterText = ref("");
|
||||
const treeRef = ref();
|
||||
@@ -63,6 +67,7 @@ defineExpose({ getTreeData });
|
||||
flex-direction: column;
|
||||
padding: 5px;
|
||||
height: calc(100% - 70px);
|
||||
background-color: #fff;
|
||||
.el-input {
|
||||
width: 100%;
|
||||
margin: 0 10px 10px 0;
|
||||
|
||||
Reference in New Issue
Block a user