From 1bb4c76deb951b5726eed0ef69a5a1a28eceff53 Mon Sep 17 00:00:00 2001 From: yangjianbo Date: Thu, 15 Jan 2026 15:57:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=B4=A6=E5=8F=B7=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E8=B0=83=E5=BA=A6=E5=88=87=E6=8D=A2=E5=90=8E?= =?UTF-8?q?=E7=9A=84=E5=86=97=E4=BD=99=E5=88=97=E8=A1=A8=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 切换账号调度状态后,updateSchedulableInList 已完成局部更新, 无需再调用 load() 刷新整个列表。此修改减少不必要的 API 请求, 避免 UI 闪烁。 Co-Authored-By: Claude Opus 4.5 --- frontend/src/views/admin/AccountsView.vue | 6 ------ 1 file changed, 6 deletions(-) diff --git a/frontend/src/views/admin/AccountsView.vue b/frontend/src/views/admin/AccountsView.vue index f465c001..cf484303 100644 --- a/frontend/src/views/admin/AccountsView.vue +++ b/frontend/src/views/admin/AccountsView.vue @@ -357,9 +357,6 @@ const handleBulkToggleSchedulable = async (schedulable: boolean) => { } else { selIds.value = hasIds ? [] : accountIds } - load().catch((error) => { - console.error('Failed to refresh accounts:', error) - }) } catch (error) { console.error('Failed to bulk toggle schedulable:', error) appStore.showError(t('common.error')) @@ -383,9 +380,6 @@ const handleToggleSchedulable = async (a: Account) => { try { const updated = await adminAPI.accounts.setSchedulable(a.id, nextSchedulable) updateSchedulableInList([a.id], updated?.schedulable ?? nextSchedulable) - load().catch((error) => { - console.error('Failed to refresh accounts:', error) - }) } catch (error) { console.error('Failed to toggle schedulable:', error) appStore.showError(t('admin.accounts.failedToToggleSchedulable'))