fix: 解决空数据的判断; #227

Merged
yangws merged 1 commits from yangws into main 2024-09-19 16:03:40 +08:00
1 changed files with 2 additions and 0 deletions
Showing only changes of commit 746cb150c4 - Show all commits

View File

@ -64,6 +64,8 @@ const getVertion = (data) => {
childs: []
}
})
//
if(treeData.value.length === 0) return
nextTick(() => {
defaultExpandedKeys.value = [treeData.value[0].id]
node.currentNode.data = treeData.value[0]