Browse Source

use antd Result (#4682)

* use antd Result

* up antd 3.20.0
pull/4715/head
陈帅 7 years ago
committed by GitHub
parent
commit
f715d9f77c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      package.json
  2. 28
      src/pages/404.tsx

2
package.json

@ -56,7 +56,7 @@
"dependencies": {
"@ant-design/pro-layout": "^4.5.7",
"@antv/data-set": "^0.10.2",
"antd": "^3.19.1",
"antd": "^3.20.0",
"classnames": "^2.2.6",
"dva": "^2.4.1",
"lodash": "^4.17.11",

28
src/pages/404.tsx

@ -1,4 +1,4 @@
import { Button } from 'antd';
import { Button, Result } from 'antd';
import React from 'react';
import router from 'umi/router';
@ -6,22 +6,16 @@ import router from 'umi/router';
// 但是还没发布,先来个简单的。
const NoFoundPage: React.FC<{}> = () => (
<div
style={{
height: '100vh',
padding: 80,
textAlign: 'center',
}}
>
<img src="https://gw.alipayobjects.com/zos/antfincdn/wsE2Pw%243%26L/noFound.svg" alt="404" />
<br />
<br />
<h1>404</h1>
<p>Sorry, the page you visited does not exist.</p>
<Button type="primary" onClick={() => router.push('/')}>
Back Home
</Button>
</div>
<Result
status="404"
title="404"
subTitle="Sorry, the page you visited does not exist."
extra={
<Button type="primary" onClick={() => router.push('/')}>
Back Home
</Button>
}
></Result>
);
export default NoFoundPage;

Loading…
Cancel
Save