Merge pull request 'fix: 解决空数据的判断;' (#227) from yangws into main

Reviewed-on: #227
This commit is contained in:
yangws 2024-09-19 16:03:39 +08:00
commit 59de30b6b2
1 changed files with 2 additions and 0 deletions

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]