微调
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
:props="defaultProps"
|
||||
node-key="id"
|
||||
default-expand-all
|
||||
show-checkbox
|
||||
:default-checked-keys="defaultChecked"
|
||||
@node-click="handleNodeClick"
|
||||
@check-change="changeSelect"
|
||||
@@ -25,7 +24,9 @@
|
||||
class="custom-tree-node"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
|
||||
<CircleCheck v-if="data.isChildNode && data.scriptIdx < currentIndex" style="width:18px;height: 18px;margin-right:8px;color:#67C23A;"/>
|
||||
<svg-icon name="wind" spin></svg-icon>
|
||||
<Loading v-if="data.isChildNode && data.scriptIdx === currentIndex" style="width:18px;height: 18px;margin-right:8px;color:#E6A23C;"/>
|
||||
<span>{{ node.label }}</span>
|
||||
</span>
|
||||
@@ -52,7 +53,16 @@ const treeList: any = ref([]);
|
||||
const getTreeData = (val: any) => {
|
||||
defaultChecked.value = [];
|
||||
data.value = val;
|
||||
defaultChecked.value.push(data.value[0].children[0].children[0].id);
|
||||
|
||||
if(data.value[0].children[0].hasOwnProperty("children"))
|
||||
{
|
||||
defaultChecked.value.push(data.value[0].children[0].children[0].id);
|
||||
}
|
||||
else
|
||||
{
|
||||
defaultChecked.value.push(data.value[0].children[0].id);
|
||||
}
|
||||
|
||||
treeRef.value.setCurrentKey(defaultChecked.value);
|
||||
};
|
||||
const filterText = ref("");
|
||||
|
||||
Reference in New Issue
Block a user