From 7319ab1ce998a7d13f0192a4ccaf92d4a02929f8 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 11 十二月 2024 14:33:43 +0800
Subject: [PATCH] 电路试验上传文件报错
---
src/components/tool/echart.vue | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/components/tool/echart.vue b/src/components/tool/echart.vue
index c0686d1..d0f7674 100644
--- a/src/components/tool/echart.vue
+++ b/src/components/tool/echart.vue
@@ -19,7 +19,7 @@
default: () => {}
},
datas: {
- type: Array,
+ type: Object,
default: () => {}
}
},
@@ -34,7 +34,9 @@
deep: true,
// immediate: true,
handler(val) {
- this.init();
+ this.$nextTick(() => {
+ this.init();
+ })
},
},
},
@@ -74,6 +76,14 @@
case 'line':
iuCharts.drawLine(this.chart,this.datas)
break;
+ case 'pie':
+ iuCharts.drawPie(this.chart,this.datas)
+ break;
+ case 'gauge':
+ iuCharts.drawGauge(this.chart,this.datas)
+ break;
+ default:
+ break;
}
setTimeout(()=>{
this.chart.resize()
@@ -91,7 +101,6 @@
this.chart.resize();
});
},
-
/* 褰撶獥鍙g缉鏀炬椂锛宔chart鍔ㄦ�佽皟鏁磋嚜韬ぇ灏� */
windowResizeListener() {
if (!this.chart) return;
@@ -103,6 +112,6 @@
<style scoped>
.echart_size{
width: 100%;
- height: 500px;
+ height: 100%;
}
</style>
--
Gitblit v1.9.3