diff --git a/src/components/Sidebar/index.css b/src/components/Sidebar/index.css index 5179546..0106c89 100644 --- a/src/components/Sidebar/index.css +++ b/src/components/Sidebar/index.css @@ -183,7 +183,8 @@ } .sidebar-retract-wrapper { - width: 95px; + width: 84px; + .sidebar-title { > img { margin: 0; @@ -197,12 +198,21 @@ width: 0; } } - .user-info { - margin-bottom: 41px; + .user-info-wrapper { + background-color: transparent; + width: 100%; + justify-content: center; + + .user-avatar { + margin-right: 0; + width: 40px; + height: 40px; + } } .visitor-count { display: none; } + .sidebar-menu { .sidebar-menu-title { text-align: center; diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index 9fd3cbb..4bb3861 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -3,6 +3,7 @@ import { Statistic } from "@arco-design/web-react"; import { useSelector } from "react-redux"; import IconFont from "@/components/IconFont"; import ICON from "@/assets/images/Sidebar/sidebar_icon.png"; +import ICONRETRACT from "@/assets/images/Sidebar/logo.png"; import BTNICON from "@/assets/images/Sidebar/btn_icon.png"; import routes from "@/routes"; import "./index.css"; @@ -29,7 +30,7 @@ const Sidebar = ({ isCollapsed, setIsCollapsed }) => { }`} >
- icon + icon
{ className="user-avatar" src="//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp" /> -
- {studentInfo?.realName} - 学号:{studentInfo?.id} -
+ {isCollapsed && ( +
+ {studentInfo?.realName} + 学号:{studentInfo?.id} +
+ )}
{ return (