From 3ad4391e108347bbbd09fdc6f3607fe408f6acae Mon Sep 17 00:00:00 2001 From: lyc Date: Tue, 3 Dec 2024 10:11:51 +0800 Subject: [PATCH] =?UTF-8?q?edit=20=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/choose-textbook/index.vue | 19 +- .../template-study/container/right.vue | 377 ++++++++++-------- .../src/components/typing-effect/index.vue | 37 +- .../examination-analysis/container/dialog.vue | 2 +- 4 files changed, 255 insertions(+), 180 deletions(-) diff --git a/src/renderer/src/components/choose-textbook/index.vue b/src/renderer/src/components/choose-textbook/index.vue index 3c4414d..781b86b 100644 --- a/src/renderer/src/components/choose-textbook/index.vue +++ b/src/renderer/src/components/choose-textbook/index.vue @@ -142,13 +142,18 @@ const handleNodeClick = (data) => { //增加一个label 之前取的label nodeData.label = nodeData.itemtitle - // 父级节点 如果当前是一级节点 父级则为null - let parent = { - id: nodeData.parentid, - label: nodeData.parenttitle, - itemtitle: nodeData.parenttitle - } - const parentNode = nodeData.parentid ? parent : null + let parentNode + // 父级id == rootid 说明当前节点为一级节点 + if(nodeData.parentid == nodeData.rootid){ + parentNode = null + } + else{ + parentNode = { + id: nodeData.parentid, + label: nodeData.parenttitle, + itemtitle: nodeData.parenttitle + } + } nodeData.parentNode = parentNode let curData = { textBook: { diff --git a/src/renderer/src/components/template-study/container/right.vue b/src/renderer/src/components/template-study/container/right.vue index 98a5b8d..ffcb56c 100644 --- a/src/renderer/src/components/template-study/container/right.vue +++ b/src/renderer/src/components/template-study/container/right.vue @@ -26,52 +26,52 @@ -
- - +
+ +
@@ -83,7 +83,7 @@