no message

Former-commit-id: d1f80b39d33b7abed8bce316eddf66197f3f777f
Former-commit-id: 2ee7220fac486f9beb8f2c399ba3531337684b42
Former-commit-id: 7b915198011466f847e4f782f8527fb6db77543e
This commit is contained in:
李杨
2018-02-17 20:56:39 +08:00
parent 6d17d13614
commit 1bf1af01f4
2 changed files with 12 additions and 5 deletions

View File

@@ -5,7 +5,7 @@
<Icon
class="chart-card-header-icon"
name="refresh"
@click="handleRefresh">
@click.native="handleRefresh">
</Icon>
</span>
</div>

View File

@@ -9,9 +9,12 @@
<ChartCardHeader
slot="header"
title="近年行情"
@refresh="handleRefreshData('G2LineBase1')">
@refresh="handleRefreshData(0)">
</ChartCardHeader>
<G2LineBase ref="G2LineBase1" v-bind="chart[0]"></G2LineBase>
<G2LineBase
ref="G2LineBase1"
v-bind="chart[0]">
</G2LineBase>
</el-card>
</GridItem>
</GridLayout>
@@ -88,8 +91,12 @@ export default {
this.chartResize(name)
},
// 用户触发了卡片右上角的刷新按钮
handleRefreshData (name) {
//
handleRefreshData (index) {
const api = this.chart[index].api
this.$axios.post(api.url, api.data)
.then(res => {
this.chart[index].data = res
})
}
}
}