代码提交-3-13

This commit is contained in:
2026-03-13 14:32:43 +08:00
parent dba9080e8c
commit 68b50e2577
39 changed files with 5658 additions and 922 deletions

View File

@@ -4,7 +4,7 @@
<script setup>
import * as echarts from "echarts";
import { nextTick, onMounted, ref } from "vue";
import { nextTick, onMounted, onUnmounted, ref, watch } from "vue";
import { listCircularDiagram } from "@/api/sidebar/reportAnalytics.js";
import { defineProps } from "vue";
@@ -51,10 +51,12 @@ var option = {
};
//监听到有新值传入,调用函数重新渲染
watch(props, newData => {
option.series.data = newData.data;
freshEchart();
});
watch(() => props.data, (newData) => {
if (chartInstance && newData) {
option.series[0].data = newData;
freshEchart();
}
}, { deep: true });
onMounted(async () => {
await nextTick(); //确保dow已经渲染完成