From 6956aeeff6a3f6af0c5fdffc009539c2cc6bf55e Mon Sep 17 00:00:00 2001 From: JayChou <2064936853@qq.com> Date: Fri, 23 Aug 2024 15:03:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9banner=E5=9B=BE=E8=BF=87?= =?UTF-8?q?=E5=A4=A7=E5=AF=BC=E8=87=B4=E5=87=BA=E7=8E=B0x=E8=BD=B4?= =?UTF-8?q?=E8=BD=A8=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Layout/index.vue | 2 +- src/styles/index.scss | 4 ++- .../components/mountNode.vue | 28 ++++++++++++++++++- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/Layout/index.vue b/src/Layout/index.vue index 4b04564..b490b71 100644 --- a/src/Layout/index.vue +++ b/src/Layout/index.vue @@ -79,7 +79,7 @@ onMounted(() => { // console.log(high,totop.value.offsetTop) if (flog.value) { - num = num - 20 + num = num - 40 totop.value.style.top = num + 'px' return } diff --git a/src/styles/index.scss b/src/styles/index.scss index bd36cad..3737f24 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -7,7 +7,9 @@ // background: url('../assets/images/banner4.jpg') no-repeat; // background-size: cover position: relative; - + img{ + width: 100%; + } .source-box { position: absolute; top: 50%; diff --git a/src/views/roadbedRecommendation/components/mountNode.vue b/src/views/roadbedRecommendation/components/mountNode.vue index 6a0b361..0826edc 100644 --- a/src/views/roadbedRecommendation/components/mountNode.vue +++ b/src/views/roadbedRecommendation/components/mountNode.vue @@ -55,6 +55,14 @@ onMounted(() => { id: '9', label: 'HTML&CSS&Javascript', }, + { + id: '10', + label: 'test', + }, + { + id: '11', + label: 'text2', + }, ], edges: [ { @@ -129,6 +137,24 @@ onMounted(() => { date: '学习基础知识', }, }, + { + source: '6', + target: '10', + data: { + type: '第一阶段', + amount: '10学时', + date: '学习基础知识', + }, + }, + { + source: '6', + target: '11', + data: { + type: '第一阶段', + amount: '10学时', + date: '学习基础知识', + }, + }, ], } @@ -336,7 +362,7 @@ onMounted(() => { graph.render() var edges = graph.getEdges() - edges.forEach(function (edge:any) { + edges.forEach(function (edge: any) { var line = edge.getKeyShape() var stroke = line.attr('stroke') var targetNode = edge.getTarget()