fix: page title support click to reload

This commit is contained in:
alt0
2022-09-28 15:30:57 +08:00
parent 287e6ff1c4
commit 7c5de7b20c
2 changed files with 13 additions and 2 deletions

View File

@@ -121,7 +121,7 @@ const StyledHeaderRoot = styled('div')(({ theme }) => {
}; };
}); });
const FlexContainer = styled('div')({ display: 'flex' }); const FlexContainer = styled('div')({ display: 'flex', alignItems: 'center' });
const TitleContainer = styled('div')(({ theme }) => { const TitleContainer = styled('div')(({ theme }) => {
return { return {

View File

@@ -72,7 +72,11 @@ export const CurrentPageTitle = () => {
}, [pageTitle]); }, [pageTitle]);
return pageTitle ? ( return pageTitle ? (
<ContentText type="sm" title={pageTitle}> <ContentText
type="sm"
onClick={() => window.location.reload()}
title={pageTitle}
>
{pageTitle} {pageTitle}
</ContentText> </ContentText>
) : null; ) : null;
@@ -85,5 +89,12 @@ const ContentText = styled(Typography)(({ theme }) => {
overflow: 'hidden', overflow: 'hidden',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
padding: '6px 12px',
cursor: 'pointer',
borderRadius: '5px',
'&:hover': {
backgroundColor: '#F5F7F8',
},
}; };
}); });