Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

yusm 7 miesięcy temu
rodzic
commit
9336323301

+ 9 - 1
fhKeeper/formulahousekeeper/timesheet/src/components/echartsEchar.vue

@@ -25,6 +25,10 @@ export default {
     clickOnTheEvent: { // 是否开启点击事件
       type: [Boolean],
       default: false
+    },
+    updateChartSize: { // 是否需要自动更新图表的大小
+      type: [Boolean],
+      default: false
     }
   },
   components: {},
@@ -51,12 +55,16 @@ export default {
           })
         }
         this.myChart.setOption(this.options, { notMerge: true });
+        if (this.updateChartSize) {
+          this.$nextTick(() => {
+            this.myChart.resize(); // 在DOM更新后,调用resize方法更新图表大小
+          });
+        }
       }
     },
   },
   created() {
     this.uuid = this.idGen();
-    console.log(this.uuid, '<===== uuId')
   },
   mounted() {
     this.myChart = echarts.init(document.getElementById(this.uuid));

Plik diff jest za duży
+ 517 - 720
fhKeeper/formulahousekeeper/timesheet/src/views/project/summary.vue