From 875cccae79c6e318ab0efc23b15e3bbd2fb5e3b0 Mon Sep 17 00:00:00 2001 From: lyc Date: Wed, 4 Dec 2024 15:07:52 +0800 Subject: [PATCH] =?UTF-8?q?edit=20=E7=AB=A0=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/components/choose-textbook/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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{ -- 2.44.0.windows.1