Tree

Tree组件

设置Tree组件全部展开

1
2
3
4
5
6
7
8
9
10
11
12
13
const authTreeRef = ref()
// checkbox
const checkStrictly = ref(true)
// 展开
const expand = ref(false)
watch(() => expand.value, () => {
console.log(`output->expand.value`, expand.value)
let nodes = authTreeRef.value.store.nodesMap;
for (const node in nodes) {
nodes[node].expanded = expand.value;
// nodes[node].checked = expand.value; 设置全选
}
})