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); + }); } }