无设备处理

This commit is contained in:
仲么了
2024-01-29 14:57:49 +08:00
parent a0c582e1dd
commit 9351307908
13 changed files with 135 additions and 138 deletions

View File

@@ -37,12 +37,16 @@ getLineTree().then(res => {
})
tree.value = res.data
nextTick(() => {
treRef.value.treeRef.setCurrentKey(arr[0].id)
// 注册父组件事件
emit('init', {
level: 2,
...arr[0]
})
if (arr.length) {
treRef.value.treeRef.setCurrentKey(arr[0].id)
// 注册父组件事件
emit('init', {
level: 2,
...arr[0]
})
} else {
emit('init')
}
})
})
</script>