src/views/home/data-car/index.vue
@@ -28,8 +28,7 @@ import * as echarts from 'echarts'; import {car} from "../../../api/platform/home"; var chartDom = document.getElementById('main'); var myChart = echarts.init(chartDom); var myChart = null; var option; let observer = null; export default { @@ -275,6 +274,7 @@ const month = (date.getMonth() + 1) >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1); this.date = year + '-' + month; this.params.date = this.date; myChart = echarts.init(this.$refs.chartContent); this.getChart(); this.observe(); },