From a3c85846fc933ba0e7f5963c85561bb9117bc6a2 Mon Sep 17 00:00:00 2001 From: zhaotiantian <18710962446@163.com> Date: Fri, 24 Nov 2023 14:58:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=88=E7=AB=AF=E6=8A=A5=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/components/body-d-left/twoL.vue | 5 +- src/components/body-d-right/oneR.vue | 156 ++++++++++++++++++++------- src/components/body-d-right/twoR.vue | 3 + 4 files changed, 126 insertions(+), 39 deletions(-) diff --git a/package.json b/package.json index fffa7e8..cf423ac 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "dayjs": "^1.11.10", "path": "^0.12.7", "vue": "^3.3.4", + "vue-seamless-scroll": "^1.1.23", "vue3-seamless-scroll": "^2.0.1" }, "devDependencies": { diff --git a/src/components/body-d-left/twoL.vue b/src/components/body-d-left/twoL.vue index 5737e0c..4076748 100644 --- a/src/components/body-d-left/twoL.vue +++ b/src/components/body-d-left/twoL.vue @@ -40,7 +40,7 @@ function initChart(xData,ydata){ top: '10%', left:'8%', right:'8%', - bottom: '14%' + bottom: '20%' }, xAxis: { type: 'category', @@ -82,6 +82,9 @@ function initChart(xData,ydata){ ] } myChart.setOption(options) + window.addEventListener('resize', () => { + myChart.resize(); + }); } \ No newline at end of file diff --git a/src/components/body-d-right/twoR.vue b/src/components/body-d-right/twoR.vue index 5e85e72..5018283 100644 --- a/src/components/body-d-right/twoR.vue +++ b/src/components/body-d-right/twoR.vue @@ -69,6 +69,9 @@ function initChart(xData,ydata){ ] } myChart.setOption(options) + window.addEventListener('resize', () => { + myChart.resize(); + }); }