no message

Former-commit-id: 854dacd28d5d176d72cc1fbdc625917326be6daf
Former-commit-id: 889bcea85881a67a17a791d3c445cdb43fdb1a85
Former-commit-id: adb66c36629380ccf256313d10dd99a34f993e50
This commit is contained in:
李杨
2018-01-28 23:22:25 +08:00
parent 533bc4f9e7
commit 555585b332
10 changed files with 38 additions and 25 deletions

View File

@@ -2,7 +2,7 @@
<Container type="ghost" :responsive="true" class="demo-chart-index">
<GridLayout v-bind="layout">
<GridItem v-bind="layout.layout[0]" @resize="resizeHandler('G2Line1')" @resized="resizedHandler('G2Line1')">
<el-card><G2Line1 ref="G2Line1" :data="G2Line1Data"></G2Line1></el-card>
<el-card><G2Line1 ref="G2Line1" :data="G2Line1"></G2Line1></el-card>
</GridItem>
</GridLayout>
</Container>
@@ -29,23 +29,20 @@ export default {
margin: [10, 10],
useCssTransforms: true
},
G2Line1Data: []
// 数据
G2Line1: []
}
},
mounted () {
setTimeout(() => {
this.G2Line1Data = [
{ year: '1991', value: 3 },
{ year: '1992', value: 4 },
{ year: '1993', value: 3.5 },
{ year: '1994', value: 5 },
{ year: '1995', value: 4.9 },
{ year: '1996', value: 6 },
{ year: '1997', value: 7 },
{ year: '1998', value: 9 },
{ year: '1999', value: 13 }
const api = [
'/api/chart/G2Line1'
]
}, 3000)
this.$axios.all(api.map(e => this.$axios.get(e)))
.then(this.$axios.spread((G2Line1) => {
this.G2Line1 = G2Line1
}))
}, 300)
},
methods: {
// 改变尺寸