diff --git a/src/view/echarts_hygiene/pie4.vue b/src/view/echarts_hygiene/pie4.vue index c0b2f93..4c1b97f 100644 --- a/src/view/echarts_hygiene/pie4.vue +++ b/src/view/echarts_hygiene/pie4.vue @@ -19,9 +19,9 @@ const props = defineProps({ }); const chart = ref(); // 创建DOM引用 const data = reactive({ - list: [6280, 5924, 1824], - year: [2022, 2023, 2024], - bg: [0, 0, 0], + list: [], + year: [], + bg: [], option: {}, }); @@ -164,8 +164,9 @@ const setChart = () => { onBeforeMount(() => { setTimeout(() => { - // data.list = props.list; - // data.year = props.year; + data.list = props.list; + data.year = props.year; + data.bg=data.year.map(item=>0) getOption(); setChart(); }, 600); diff --git a/src/view/hygiene.vue b/src/view/hygiene.vue index c34ebac..b26a53e 100644 --- a/src/view/hygiene.vue +++ b/src/view/hygiene.vue @@ -78,8 +78,8 @@