diff --git a/package.json b/package.json index 738494d9..34c2e875 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "dependencies": { "@ant-design/icons": "^4.7.0", "@ant-design/pro-components": "1.1.1", - "@umijs/route-utils": "^2.0.0", + "@umijs/route-utils": "2.1.3", "antd": "^4.20.0", "classnames": "^2.3.0", "lodash": "^4.17.0", diff --git a/src/pages/Welcome.less b/src/pages/Welcome.less deleted file mode 100644 index 224a7932..00000000 --- a/src/pages/Welcome.less +++ /dev/null @@ -1,8 +0,0 @@ -@import (reference) '~antd/es/style/themes/index'; - -.pre { - margin: 12px 0; - padding: 12px 20px; - background: @input-bg; - box-shadow: @card-shadow; -} diff --git a/src/pages/Welcome.tsx b/src/pages/Welcome.tsx index 23d40cd7..3b5730ca 100644 --- a/src/pages/Welcome.tsx +++ b/src/pages/Welcome.tsx @@ -1,46 +1,151 @@ import { PageContainer } from '@ant-design/pro-components'; -import { FormattedMessage, useIntl } from '@umijs/max'; -import { Alert, Card, Typography } from 'antd'; +import { Card } from 'antd'; import React from 'react'; -import styles from './Welcome.less'; -const CodePreview: React.FC = ({ children }) => ( -
-    
-      {children}
-    
-  
-); +/** + * 每个单独的卡片,为了复用样式抽成了组件 + * @param param0 + * @returns + */ +const InfoCard: React.FC<{ + title: string; + index: number; + desc: string; + href: string; +}> = ({ title, href, index, desc }) => { + return ( +
+
+
+ {index} +
+
+ {title} +
+
+
+ {desc} +
+ + 了解更多 {'>'} + +
+ ); +}; const Welcome: React.FC = () => { - const intl = useIntl(); - return ( - - +
- - +
+ 欢迎使用 Ant Design Pro +
+

+ Ant Design Pro 是一个整合了 umi,Ant Design 和 ProComponents + 的脚手架方案。致力于在设计规范和基础组件的基础上,继续向上构建,提炼出典型模板/业务组件/配套设计资源,进一步提升企业级中后台产品设计研发过程中的『用户』和『设计者』的体验。 +

+
- - - - yarn add @ant-design/pro-components + + + +
+
);