feat: 添加footer

This commit is contained in:
Shu Guang 2025-04-17 22:19:15 +08:00
parent df7c2bb696
commit 07776bee0a
2 changed files with 25 additions and 14 deletions

View File

@ -47,7 +47,7 @@
], ],
"dependencies": { "dependencies": {
"@ant-design/icons": "^4.8.1", "@ant-design/icons": "^4.8.1",
"@ant-design/pro-components": "^2.6.48", "@ant-design/pro-components": "^2.8.7",
"@monaco-editor/react": "^4.7.0", "@monaco-editor/react": "^4.7.0",
"@umijs/route-utils": "^2.2.2", "@umijs/route-utils": "^2.2.2",
"antd": "5.24.5", "antd": "5.24.5",

View File

@ -1,35 +1,46 @@
import { GithubOutlined } from '@ant-design/icons'; import { GithubOutlined, HeartFilled, WechatOutlined, MailOutlined } from '@ant-design/icons';
import { DefaultFooter } from '@ant-design/pro-components'; import { DefaultFooter } from '@ant-design/pro-components';
import React from 'react'; import React from 'react';
const Footer: React.FC = () => { const Footer: React.FC = () => {
const currentYear = new Date().getFullYear();
return ( return (
<DefaultFooter <DefaultFooter
style={{ style={{
background: 'none',
color: '#fff',
padding: '24px 0',
}} }}
copyright={
<div>
<div >
Copyright © 2023-{currentYear} 西
</div>
<div >
Powered by <HeartFilled /> SunHe
</div>
</div>
}
links={[ links={[
{ {
key: 'Ant Design Pro', key: 'home',
title: 'Ant Design Pro', title: '镐京学院',
href: 'https://pro.ant.design', href: 'https://www.sust.edu.cn/',
blankTarget: true, blankTarget: true,
}, },
{ {
key: 'github', key: 'github',
title: <GithubOutlined />, title: <GithubOutlined />,
href: 'https://github.com/ant-design/ant-design-pro', href: 'https://github.com/shuguangnet',
blankTarget: true,
},
{
key: 'Ant Design',
title: 'Ant Design',
href: 'https://ant.design',
blankTarget: true, blankTarget: true,
}, },
]} ]}
/> />
); );
}; };
export default Footer; export default Footer;