mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-02-04 07:43:28 +08:00
style: 超出隐藏问题
This commit is contained in:
@@ -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 }} />
|
||||
|
||||
@@ -36,6 +36,7 @@ a {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.multiline-ellipsis {
|
||||
|
||||
@@ -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={{
|
||||
|
||||
@@ -124,8 +124,7 @@ const MemberStatistic = ({
|
||||
container
|
||||
spacing={2}
|
||||
sx={{
|
||||
height: '100%',
|
||||
overflow: 'auto',
|
||||
overflowY: 'auto',
|
||||
borderRadius: '10px',
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -120,7 +120,6 @@ const MemberStatistic = ({
|
||||
container
|
||||
spacing={2}
|
||||
sx={{
|
||||
height: '100%',
|
||||
overflow: 'auto',
|
||||
borderRadius: '10px',
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user