fix: 解决空数据的判断;

This commit is contained in:
yangws 2024-09-19 16:02:56 +08:00
parent dbfa1a4037
commit 746cb150c4
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]