From 6d17d136143b0633a9644cdee623cccc6405b7eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=9D=A8?= <1711467488@qq.com> Date: Sat, 17 Feb 2018 20:38:49 +0800 Subject: [PATCH] no message Former-commit-id: 4c20c279c2c6c0fd9766a1552544edda0418de37 Former-commit-id: e43f4acecf8f3cf1fc4a68c7d3c4b7c6fd6647a4 Former-commit-id: dffb8bf6fd083a6187ea42fc2347d358ce4236c4 --- src/pages/demo/chart/index/index.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pages/demo/chart/index/index.vue b/src/pages/demo/chart/index/index.vue index cb333758..10cba742 100644 --- a/src/pages/demo/chart/index/index.vue +++ b/src/pages/demo/chart/index/index.vue @@ -28,6 +28,7 @@ export default { return { chart: [ { + api: {url: '/api/chart/G2Line', data: {code: 1}}, data: [], padding: [30, 40, 50, 50] } @@ -57,10 +58,7 @@ export default { methods: { // 请求图表数据 syncData () { - const api = [ - {url: '/api/chart/G2Line', data: {code: 1}} - ] - this.$axios.all(api.map(e => this.$axios.post(e.url, e.data))) + this.$axios.all(this.chart.map(e => this.$axios.post(e.api.url, e.api.data))) .then(this.$axios.spread((...res) => { res.forEach((e, index) => { this.chart[index].data = e