From cbb119117bde4554aed9b6084b8e5efd2b3391ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=98=AD?= <81747598+lan-yonghui@users.noreply.github.com> Date: Wed, 17 Jul 2024 19:09:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=9A=E4=B8=AA=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E8=AE=A1=E7=AE=97=E5=A4=A7=E5=B0=8F=EF=BC=8C?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E7=8A=B6=E6=80=81=E7=8B=AC=E8=87=AA=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=20(#5851)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/host/file-management/index.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/host/file-management/index.vue b/frontend/src/views/host/file-management/index.vue index fcb00b2d1..0fb23bcc9 100644 --- a/frontend/src/views/host/file-management/index.vue +++ b/frontend/src/views/host/file-management/index.vue @@ -265,7 +265,7 @@ link small @click="getDirSize(row, $index)" - :loading="btnLoading == $index" + :loading="btnLoading.includes($index)" > {{ $t('file.calculate') }} @@ -387,7 +387,7 @@ const initData = () => ({ }); let req = reactive(initData()); let loading = ref(false); -let btnLoading = ref(-1); +let btnLoading = ref([]); const paths = ref([]); let pathWidth = ref(0); const history: string[] = []; @@ -638,7 +638,7 @@ const getDirSize = async (row: any, index: number) => { const req = { path: row.path, }; - btnLoading.value = index; + btnLoading.value.push(index); await ComputeDirSize(req) .then(async (res) => { let newData = [...data.value]; @@ -646,7 +646,7 @@ const getDirSize = async (row: any, index: number) => { data.value = newData; }) .finally(() => { - btnLoading.value = -1; + btnLoading.value = btnLoading.value.filter((item) => item !== index); }); };