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()