Browse Source

translation of Exception

pull/1273/head
ddcat1115 8 years ago
parent
commit
b07d8cb3b8
  1. 14
      src/components/Exception/demo/403.md
  2. 10
      src/components/Exception/demo/404.md
  3. 10
      src/components/Exception/demo/500.md
  4. 18
      src/components/Exception/index.en-US.md
  5. 6
      src/components/Exception/index.zh-CN.md

14
src/components/Exception/demo/403.md

@ -1,18 +1,26 @@
---
order: 2
title: 403
title:
zh-CN: 403
en-US: 403
---
## zh-CN
403 页面,配合自定义操作。
## en-US
403 page with custom operations.
````jsx
import Exception from 'ant-design-pro/lib/Exception';
import { Button } from 'antd';
const actions = (
<div>
<Button type="primary">回到首页</Button>
<Button>查看详情</Button>
<Button type="primary">Home</Button>
<Button>Detail</Button>
</div>
);
ReactDOM.render(

10
src/components/Exception/demo/404.md

@ -1,10 +1,18 @@
---
order: 0
title: 404
title:
zh-CN: 404
en-US: 404
---
## zh-CN
404 页面。
## en-US
404 page.
````jsx
import Exception from 'ant-design-pro/lib/Exception';

10
src/components/Exception/demo/500.md

@ -1,10 +1,18 @@
---
order: 1
title: 500
title:
zh-CN: 500
en-US: 500
---
## zh-CN
500 页面。
## en-US
500 page.
````jsx
import Exception from 'ant-design-pro/lib/Exception';

18
src/components/Exception/index.en-US.md

@ -0,0 +1,18 @@
---
title: Exception
cols: 1
order: 5
---
Exceptions page is used to provide feedback on specific abnormal state. Usually, it contains an explanation of the error status, and provides users with suggestions or operations, to prevent users from feeling lost and confused.
## API
Property | Description | Type | Default
---------|-------------|------|--------
type | type of exception, the corresponding default `title`, `desc`, `img` will be given if set, which can be overridden by explicit setting of `title`, `desc`, `img` | Enum {'403', '404', '500'} | -
title | title | ReactNode | -
desc | supplementary description | ReactNode | -
img | the url of background image | string | -
actions | suggested operations, a default 'Home' link will show if not set | ReactNode | -
linkElement | to specify the element of link | string\|ReactElement | 'a'

6
src/components/Exception/index.md → src/components/Exception/index.zh-CN.md

@ -1,7 +1,5 @@
---
title:
en-US: Exception
zh-CN: Exception
title: Exception
subtitle: 异常
cols: 1
order: 5
@ -18,4 +16,4 @@ order: 5
| desc | 补充描述 | ReactNode | - |
| img | 背景图片地址 | string | - |
| actions | 建议操作,配置此属性时默认的『返回首页』按钮不生效 | ReactNode | - |
| linkElement | 定义链接的元素,默认为 `a` | string\|ReactElement | - |
| linkElement | 定义链接的元素 | string\|ReactElement | 'a' |
Loading…
Cancel
Save