From aaf0efbe40672181365a4e44ed4bdc42e922b3cf Mon Sep 17 00:00:00 2001 From: Baobhan Sith <80159437+Heavrnl@users.noreply.github.com> Date: Fri, 18 Apr 2025 10:03:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E6=97=B6=E6=96=87=E4=BB=B6=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=99=A8=E5=8D=A1=E5=9C=A8=E5=8A=A0=E8=BD=BD=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/composables/useSftpActions.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/frontend/src/composables/useSftpActions.ts b/packages/frontend/src/composables/useSftpActions.ts index 52b92bd..d951153 100644 --- a/packages/frontend/src/composables/useSftpActions.ts +++ b/packages/frontend/src/composables/useSftpActions.ts @@ -73,6 +73,12 @@ export function createSftpActionsManager( const loadDirectory = (path: string) => { if (!isSftpReady.value) { // 使用通知 store 显示错误 + // *** 新增:如果已经在加载,则阻止新的加载请求 *** + if (isLoading.value) { + console.warn(`[SFTP ${instanceSessionId}] 尝试加载目录 ${path} 但已在加载中。`); + return; + } + uiNotificationsStore.showError(t('fileManager.errors.sftpNotReady'), { timeout: 5000 }); // 使用 uiNotificationsStore isLoading.value = false; fileList.value = [];