From 534ed7b56860d478f1088720566867854ed350fe Mon Sep 17 00:00:00 2001 From: mtvpls Date: Wed, 3 Jun 2026 10:45:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=92=A4=E9=94=80=E8=AE=BE=E5=A4=87=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E5=90=8E=EF=BC=8C=E4=B8=8D=E5=86=8D=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E6=95=B4=E4=B8=AA=E5=88=97=E8=A1=A8=EF=BC=8C=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=92=A4=E9=94=80=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/UserMenu.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/UserMenu.tsx b/src/components/UserMenu.tsx index 7bbd5c0..eddb777 100644 --- a/src/components/UserMenu.tsx +++ b/src/components/UserMenu.tsx @@ -1123,8 +1123,10 @@ export const UserMenu: React.FC = () => { }); if (response.ok) { - // 重新加载设备列表 - await loadDevices(); + // 撤销成功后不重新加载列表,仅移除当前撤销的设备项 + setDevices((prevDevices) => + prevDevices.filter((device) => device.tokenId !== tokenId) + ); } else { alert('撤销失败,请重试'); }