mirror of https://github.com/bjdgyc/anylink.git
首页图表宽度自适应
This commit is contained in:
parent
7b3507d962
commit
00281dbfa5
|
@ -29,8 +29,10 @@
|
|||
},
|
||||
mounted() {
|
||||
this.initChart()
|
||||
window.addEventListener('resize', this.listenerResize);
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.listenerResize)
|
||||
},
|
||||
watch: {
|
||||
chartData:{
|
||||
|
@ -41,6 +43,9 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
listenerResize() {
|
||||
this.chart.resize();
|
||||
},
|
||||
initChart() {
|
||||
this.chart = echarts.init(this.$el)
|
||||
|
||||
|
|
Loading…
Reference in New Issue