diff --git a/src/renderer/src/components/choose-textbook/index.vue b/src/renderer/src/components/choose-textbook/index.vue index 2f5f0a2..9f6c27d 100644 --- a/src/renderer/src/components/choose-textbook/index.vue +++ b/src/renderer/src/components/choose-textbook/index.vue @@ -143,8 +143,9 @@ const handleNodeClick = (data) => { nodeData.label = nodeData.itemtitle let parentNode - // 父级id == rootid 说明当前节点为一级节点 - if(nodeData.parentid == nodeData.rootid){ + // 存在children 则为一级节点 + if(nodeData.children){ + // 为一级节点 parentNode = null } else{