|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div :id="id" :style="{ width: size, height: size }"></div>
|
|
|
+ <div ref="pieChart" :style="{ width: size, height: size }"></div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -20,7 +20,7 @@ export default {
|
|
|
rich: {
|
|
|
a: {
|
|
|
fontSize: 18,
|
|
|
- color: "#29EEF3",
|
|
|
+ color: "#f3db5c",
|
|
|
},
|
|
|
|
|
|
c: {
|
|
@@ -325,14 +325,10 @@ export default {
|
|
|
// required: true, //必要性
|
|
|
default: "150px", //默认值
|
|
|
},
|
|
|
- id: {
|
|
|
- type: String,
|
|
|
- required: true,
|
|
|
- },
|
|
|
},
|
|
|
mounted() {
|
|
|
console.log("angle", this.angle);
|
|
|
- this.chart = this.$echarts.init(document.getElementById(this.id));
|
|
|
+ this.chart = this.$echarts.init(this.$refs.pieChart);
|
|
|
this.chart.setOption(this.option);
|
|
|
// 动画效果
|
|
|
this.interval = setInterval(() => {
|