🐛fix(sidebar): Ensure sidebar displays correctly on desktop devices

When resizing from medium screens to desktop view in the console section,
the sidebar previously failed to appear automatically. This commit fixes
the issue by simplifying the logic to always show the sidebar when in
desktop mode and in console pages, regardless of previous screen size.
This commit is contained in:
Apple\Apple
2025-05-20 12:59:47 +08:00
parent 4489475bb0
commit 74d4a54120
2 changed files with 32 additions and 10 deletions

View File

@@ -373,8 +373,8 @@ const HeaderBar = () => {
: (mobileMenuOpen ? t('关闭菜单') : t('打开菜单'))
}
onClick={() => {
if (isConsoleRoute && styleState.isMobile) {
// 控制侧边栏的显示/隐藏
if (isConsoleRoute) {
// 控制侧边栏的显示/隐藏,无论是否移动设备
styleDispatch({ type: 'TOGGLE_SIDER' });
} else {
// 控制HeaderBar自己的移动菜单