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