no message

Former-commit-id: f6a5fca09b86f3a96cb9fa66ff4b52fc3500fc72
Former-commit-id: eca145feeaa4bbef48a4a6e6a1bc7fbe999a1c8b
Former-commit-id: 231af91d28697142824bde9c2fc2e49c5f84eed2
This commit is contained in:
李杨
2018-01-28 22:45:54 +08:00
parent 430c760b13
commit 533bc4f9e7
3 changed files with 84 additions and 40 deletions

View File

@@ -1,12 +1,8 @@
<template>
<Container type="ghost" :responsive="true" class="demo-chart-index">
<GridLayout
v-bind="layout"
@layout-updated="layoutUpdatedHandler">
<GridLayout v-bind="layout">
<GridItem v-bind="layout.layout[0]" @resize="resizeHandler('G2Line1')" @resized="resizedHandler('G2Line1')">
<el-card>
<G2Line1 ref="G2Line1"></G2Line1>
</el-card>
<el-card><G2Line1 ref="G2Line1" :data="G2Line1Data"></G2Line1></el-card>
</GridItem>
</GridLayout>
</Container>
@@ -32,18 +28,36 @@ export default {
verticalCompact: true,
margin: [10, 10],
useCssTransforms: true
}
},
G2Line1Data: []
}
},
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 }
]
}, 3000)
},
methods: {
// 改变尺寸
resizeHandler (name) {
this.$nextTick(() => {
this.$refs[name].resize()
this.$refs[name].resize()
})
},
// 改变尺寸完成
resizedHandler (name) {
this.$nextTick(() => {
this.$refs[name].resize()
this.$refs[name].resize()
})
}
}
@@ -64,6 +78,8 @@ export default {
}
}
.vue-resizable-handle {
bottom: 6px;
right: 6px;
opacity: .3;
&:hover{
opacity: 1;