From a3e5119206c60e010f72dcb7344c7079c08b8bfa Mon Sep 17 00:00:00 2001 From: gtz <535262213@qq.com> Date: Mon, 15 May 2023 10:50:08 +0800 Subject: [PATCH] =?UTF-8?q?'=E6=8D=A2=E7=81=AB=E6=97=B6=E9=97=B4BUG?= =?UTF-8?q?=EF=BC=8C=E6=9F=B1=E7=8A=B6=E5=9B=BElabel=E7=BA=B5=E5=90=91'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/charts/BarChart.vue | 6 ++++-- src/components/isolate-area-1/Area.vue | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/charts/BarChart.vue b/src/components/charts/BarChart.vue index 1d081cf..886cf8f 100644 --- a/src/components/charts/BarChart.vue +++ b/src/components/charts/BarChart.vue @@ -75,7 +75,7 @@ export default { this.chart = echarts.init(document.getElementById(this.id)); this.chart.setOption({ grid: { - top: adjust(10), + top: adjust(20), left: adjust(28), bottom: adjust(18), right: adjust(12), @@ -147,7 +147,9 @@ export default { show: true, fontSize: adjust(7), color: "#eee8", - position: "top", + position: "topRight", + rotate: 90, + offset: [5, 0] }, itemStyle: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ diff --git a/src/components/isolate-area-1/Area.vue b/src/components/isolate-area-1/Area.vue index d9b11f3..4f5428f 100644 --- a/src/components/isolate-area-1/Area.vue +++ b/src/components/isolate-area-1/Area.vue @@ -43,8 +43,12 @@ export default { timeFun = setInterval(() => { if (sec > 0) sec -= 1 else { - sec = 59 - min -= 1 + if (min > 0) { + sec = 59 + min -= 1 + } else { + if (timeFun) clearInterval(timeFun) + } } this.$set(this.rdata[2], 'value', `${min}分${sec}秒`) }, 1000)