Compare commits

...

2 Commits

Author SHA1 Message Date
yangws 59de30b6b2 Merge pull request 'fix: 解决空数据的判断;' (#227) from yangws into main
Reviewed-on: #227
2024-09-19 16:03:39 +08:00
yangws 746cb150c4 fix: 解决空数据的判断; 2024-09-19 16:02:56 +08:00
1 changed files with 2 additions and 0 deletions

View File

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