From 310a5f837dd94e9beace9d745810ffd21eeae536 Mon Sep 17 00:00:00 2001 From: guoyue Date: Thu, 14 Jul 2022 14:16:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=87=E5=AF=BC=E6=89=8B=E5=86=8C=EF=BC=9A?= =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E6=A0=91=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/abilityDocTree.vue | 20 +-- front/src/views/instructionManual/index.vue | 169 ++++++++---------- 2 files changed, 84 insertions(+), 105 deletions(-) diff --git a/front/src/views/instructionManual/components/abilityDocTree.vue b/front/src/views/instructionManual/components/abilityDocTree.vue index 45b5b671..9bd66da0 100644 --- a/front/src/views/instructionManual/components/abilityDocTree.vue +++ b/front/src/views/instructionManual/components/abilityDocTree.vue @@ -2,7 +2,7 @@
-
{{ item.title }} @@ -28,10 +28,6 @@ const props = defineProps({ type: Array, default: () => [] }, - selectName: { - type: String, - default: '' - }, level: { type: Number, default: 1 @@ -59,15 +55,13 @@ const judgeLeaf = (item) => { } const showChildren = (item) => { - if (!item.children) { + if (!(item.children && item.children.length > 0)) { if (newClickData.value.title !== '') { handleTreeItem(item) } else { handleTreeItem({ title: '' }) } - item.isSelect = !item.isSelect; } - if (item.children && item.children.length > 0) { item.show = !item.show; } @@ -113,33 +107,31 @@ const handleTreeItem = (item) => { &:hover { color: #0058e1; + cursor: pointer; } } -.normal { - color: #333; -} - .parent { margin-bottom: 10px; background: rgba(0, 135, 225, 0.1); color: #333; - // margin-bottom: 10px; - &:hover { color: #fff; background: #0058e1; + cursor: pointer; } } .leaf { font-size: 14px; color: #555; + cursor: pointer; } .select { color: #0058e1; font-weight: 600; + cursor: pointer; } diff --git a/front/src/views/instructionManual/index.vue b/front/src/views/instructionManual/index.vue index a26dd1f7..51c099b2 100644 --- a/front/src/views/instructionManual/index.vue +++ b/front/src/views/instructionManual/index.vue @@ -2,21 +2,27 @@