DESKTOP-70VPDLK\Administrator vor 1 Jahr
Ursprung
Commit
68edd99de7
2 geänderte Dateien mit 3 neuen und 5 gelöschten Zeilen
  1. 1 3
      common/chart/pie_chart.vue
  2. 2 2
      pages/index/index.vue

+ 1 - 3
common/chart/pie_chart.vue

@@ -112,7 +112,6 @@
 				}, 500);
 			},
 			setData(data) {
-				console.log(data)
 				setTimeout(() => {
 					//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
 					let res = {
@@ -121,7 +120,6 @@
 						}]
 					};
 					this.chartData = JSON.parse(JSON.stringify(res));
-					this.setNoData()
 				}, 50);
 			},
 			setNoData() {
@@ -138,4 +136,4 @@
 		width: 135px;
 		height: 135px;
 	}
-</style>
+</style>

+ 2 - 2
pages/index/index.vue

@@ -152,8 +152,8 @@
 							this.chartList[1].value = 0;
 							this.chartList[2].value = 0;
               setTimeout(()=>{
-                this.$refs.pieChart.setData(this.chartList)
-                this.$refs.circleObj.notServerData(0)
+                this.$refs.pieChart.setNoData()
+                this.$refs.circleObj.notServerData()
               },50)
 						}