Merge pull request 'fix: 解决空数据的判断;' (#227) from yangws into main
Reviewed-on: #227
This commit is contained in:
commit
59de30b6b2
|
@ -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]
|
||||||
|
|
Loading…
Reference in New Issue