From 759d2a289ecf8e5d589a9b8b8cdac3826f03718e Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期二, 18 六月 2024 17:32:19 +0800 Subject: [PATCH] 修改高德地图key,并添加密钥 --- src/components/chart/ProgressLineChart.vue | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/chart/ProgressLineChart.vue b/src/components/chart/ProgressLineChart.vue index 4aedf0a..7a40cc0 100644 --- a/src/components/chart/ProgressLineChart.vue +++ b/src/components/chart/ProgressLineChart.vue @@ -40,7 +40,9 @@ allSeries: [], option: null, pageSize: 200, - progress: 0 + progress: 0, + // 瀵瑰簲progress杩涘害涓嬶紝鎵�灞曠ず鏁版嵁鐨勮捣濮嬬储寮� + sIndex: 0 }; }, emits: ['chartClick'], @@ -155,8 +157,9 @@ len = len < 0 ? 0 : len; const sIndex = Math.round((len * this.progress) / 100); const eIndex = sIndex + this.pageSize; - const startPer = (sIndex / this.allXAxis.length) * 100; + const startPer = (this.sIndex / this.allXAxis.length) * 100; const endPer = (eIndex / this.allXAxis.length) * 100; + this.sIndex = sIndex; return { sIndex, eIndex, startPer, endPer }; } }, @@ -166,7 +169,8 @@ mounted() { this.lineChart = echarts.init(this.$refs.lineChart); this.lineChart.on('click', (e) => { - this.$emit('chartClick', e.dataIndex); + console.log(e); + this.$emit('chartClick', this.sIndex + e.dataIndex); }); } }; -- Gitblit v1.9.3