From 056d43dd8884af5e57e81e107d2c1c4f57aacbc3 Mon Sep 17 00:00:00 2001 From: lnn19986213 <1667908750@qq.com> Date: Tue, 2 Jul 2024 09:35:28 +0800 Subject: [PATCH] gx --- src/view/analyze.vue | 2 +- src/view/echart_analyze/right1.vue | 9 +++++++++ src/view/education.vue | 5 ----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/view/analyze.vue b/src/view/analyze.vue index 6151f09..7004296 100644 --- a/src/view/analyze.vue +++ b/src/view/analyze.vue @@ -409,7 +409,7 @@ onMounted(() => { startAutoSwitching(); }); -onBeforeMount(() => { +onBeforeMount(async () => { getData(); }); diff --git a/src/view/echart_analyze/right1.vue b/src/view/echart_analyze/right1.vue index 72f1dfb..771a97d 100644 --- a/src/view/echart_analyze/right1.vue +++ b/src/view/echart_analyze/right1.vue @@ -10,6 +10,7 @@ import { defineProps, ref, nextTick, + watch, } from "vue"; // 局部引入echarts核心模块 import * as echarts from "echarts"; @@ -168,9 +169,17 @@ const setChart1 = () => { data.list2.push(item.rs); //数量 }); }; +// 监听 +watch( + () => props.list, + (newVal, oldVal) => { + console.log(2222,newVal, oldVal) + } +); onBeforeMount(() => { setTimeout(() => { data.list = props.list; + console.log(1111,data.list) setChart1(); getOption(); setChart(); diff --git a/src/view/education.vue b/src/view/education.vue index 44eb540..de5100d 100644 --- a/src/view/education.vue +++ b/src/view/education.vue @@ -687,11 +687,6 @@ onBeforeMount(async () => { }); onMounted(() => { startAutoScroll(); - console.log( - mainRef.value.scrollTop, - mainRef.value.scrollHeight, - mainRef.value.clientHeight - ); });