style: 超出隐藏问题

This commit is contained in:
Gavan
2025-07-14 17:53:53 +08:00
parent dd43ad399a
commit 2f0fe79e0d
5 changed files with 8 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
import { Button, IconButton, Stack } from '@mui/material';
import { Icon, message } from '@c-x/ui';
import { useNavigate } from 'react-router-dom';
import { useNavigate, useLocation } from 'react-router-dom';
import LogoutIcon from '@mui/icons-material/Logout';
import DownloadIcon from '@mui/icons-material/Download';
import { Box } from '@mui/material';
@@ -8,7 +8,7 @@ import Bread from './Bread';
const Header = () => {
const navigate = useNavigate();
const { pathname } = useLocation();
return (
<Stack
direction={'row'}
@@ -44,11 +44,10 @@ const Header = () => {
},
}}
onClick={() => {
// 清除本地存储的认证信息
localStorage.removeItem('auth_token');
localStorage.removeItem('user_info');
message.success('退出登录成功');
navigate('/login', { replace: true });
navigate(pathname.startsWith('/user/') ? '/user/login' : '/login', {
replace: true,
});
}}
>
<LogoutIcon sx={{ fontSize: 16 }} />

View File

@@ -36,6 +36,7 @@ a {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
min-width: 0;
}
.multiline-ellipsis {

View File

@@ -51,7 +51,7 @@ const MainLayout = () => {
}}
>
<Sidebar />
<Stack gap={2} sx={{ flex: 1, mr: 2, ml: 0 }}>
<Stack gap={2} sx={{ flex: 1, minWidth: 0, mr: 2, ml: 0 }}>
<Header />
<Box
sx={{

View File

@@ -124,8 +124,7 @@ const MemberStatistic = ({
container
spacing={2}
sx={{
height: '100%',
overflow: 'auto',
overflowY: 'auto',
borderRadius: '10px',
}}
>

View File

@@ -120,7 +120,6 @@ const MemberStatistic = ({
container
spacing={2}
sx={{
height: '100%',
overflow: 'auto',
borderRadius: '10px',
}}