From 45d4f2b008b19b355ffac1014aeb2ebbe78a4f82 Mon Sep 17 00:00:00 2001 From: zhilv Date: Fri, 27 Mar 2026 11:02:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B4=A6=E5=8F=B7=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E6=94=B6=E7=BC=A9=E5=B1=95=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/account/AccountSidebar.tsx | 29 +++++++++-------------- src/pages/accouts/Account.tsx | 4 ++-- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/src/components/account/AccountSidebar.tsx b/src/components/account/AccountSidebar.tsx index f285fd4..4112d03 100644 --- a/src/components/account/AccountSidebar.tsx +++ b/src/components/account/AccountSidebar.tsx @@ -59,8 +59,8 @@ const AccountSidebar = (props: AccountSidebarProps) => { > {(account) => { - const selected = account.id === props.selectedAccountId; - const expanded = account.id === props.expandedAccountId; + const selected = () => account.id === props.selectedAccountId; + const expanded = () => account.id === props.expandedAccountId; const platformLabel = props.hostLabels[account.host] ?? account.host; const statusLabel = @@ -70,13 +70,13 @@ const AccountSidebar = (props: AccountSidebarProps) => { return (
@@ -100,14 +100,6 @@ const AccountSidebar = (props: AccountSidebarProps) => { 学号:{account.user.id}

-
- - {statusLabel} - - - {expanded ? "收起" : "展开"} - -
- +

学院:{account.user.dept}

班级:{account.user.class}

@@ -127,6 +119,7 @@ const AccountSidebar = (props: AccountSidebarProps) => {

站点:{account.host}

账号:{account.username || "-"}

课程数:{account.courses.length}

+

课程类型:{statusLabel}