mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 21:40:45 +08:00
首页图表宽度自适应
This commit is contained in:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user