fix: bug#12362

This commit is contained in:
xieyonghong 2023-04-26 16:26:41 +08:00
parent b193c56f64
commit 0a661d4a64
1 changed files with 7 additions and 1 deletions

View File

@ -54,7 +54,7 @@ const handleCancel = () => {
}; };
const _percent = computed(() => { const _percent = computed(() => {
return ((errCount.value + count.value) / total.value * 100).toFixed(2) return total.value ? ((errCount.value + count.value) / total.value * 100).toFixed(2) : 0
}) })
const getData = (api: string) => { const getData = (api: string) => {
@ -82,6 +82,12 @@ const getData = (api: string) => {
default: default:
break; break;
} }
if ((count.value + errCount.value) >= total.value) {
setTimeout(() => {
_source.close();
flag.value = false;
}, 500)
}
}; };
_source.onerror = () => { _source.onerror = () => {
_source.close(); _source.close();