From 35f2d1a572c8f0fad3df0a25b1f5cd8c78d03c79 Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Thu, 28 Nov 2024 10:14:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=B7=A5=E4=BD=9C=E5=8F=B0):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=B7=A5=E4=BD=9C=E5=8F=B0=E9=A1=B9=E7=9B=AE=E6=A6=82?= =?UTF-8?q?=E8=A7=88=E6=97=A0=E6=95=B0=E6=8D=AEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workbench/homePage/components/overview.vue | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/frontend/src/views/workbench/homePage/components/overview.vue b/frontend/src/views/workbench/homePage/components/overview.vue index d0a827d3e3..6cb245ad10 100644 --- a/frontend/src/views/workbench/homePage/components/overview.vue +++ b/frontend/src/views/workbench/homePage/components/overview.vue @@ -135,7 +135,6 @@ options.value.yAxis[0].max = maxAxis; } const showSkeleton = ref(false); - const selectAll = computed(() => appStore.projectList.length === innerProjectIds.value.length); async function initOverViewDetail() { try { @@ -170,17 +169,19 @@ } } - function handleProjectChange(shouldEmit = false) { - nextTick(() => { - innerSelectAll.value = selectAll.value; - initOverViewDetail(); - if (shouldEmit) emit('change'); - }); + async function handleProjectChange(shouldEmit = false) { + await nextTick(); + innerSelectAll.value = appStore.projectList.length === innerProjectIds.value.length; + await nextTick(); + initOverViewDetail(); + if (shouldEmit) emit('change'); } function popupVisibleChange(val: boolean) { if (!val) { - handleProjectChange(true); + nextTick(() => { + handleProjectChange(true); + }); } }