瀏覽代碼

解决图表侧标name不更新问题

mw_666 3 年之前
父節點
當前提交
13a76b2d2e
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/components/chart/combination/bar-line-chart.vue

+ 4 - 1
src/components/chart/combination/bar-line-chart.vue

@@ -276,7 +276,7 @@ export default {
           },
         });
       }
-
+console.log(JSON.stringify(option))
       chart.setOption(option);
     },
   },
@@ -301,6 +301,9 @@ export default {
       this.initChart();
     });
   },
+  beforeUpdate(){
+	  this.areaData = this.bardata.area;
+  },
   watch: {
     bardata(val) {
       if (val.area && val.area.length < this.pageSize) {