From b07d8cb3b8a840e4924030123131487bc660c4aa Mon Sep 17 00:00:00 2001 From: ddcat1115 Date: Tue, 10 Apr 2018 17:45:19 +0800 Subject: [PATCH] translation of Exception --- src/components/Exception/demo/403.md | 14 +++++++++++--- src/components/Exception/demo/404.md | 10 +++++++++- src/components/Exception/demo/500.md | 10 +++++++++- src/components/Exception/index.en-US.md | 18 ++++++++++++++++++ .../Exception/{index.md => index.zh-CN.md} | 6 ++---- 5 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 src/components/Exception/index.en-US.md rename src/components/Exception/{index.md => index.zh-CN.md} (87%) diff --git a/src/components/Exception/demo/403.md b/src/components/Exception/demo/403.md index 85f0ad07..bb46037f 100644 --- a/src/components/Exception/demo/403.md +++ b/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 = (
- - + +
); ReactDOM.render( diff --git a/src/components/Exception/demo/404.md b/src/components/Exception/demo/404.md index 6ff2de78..db50de65 100644 --- a/src/components/Exception/demo/404.md +++ b/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'; diff --git a/src/components/Exception/demo/500.md b/src/components/Exception/demo/500.md index 0ed9cedb..096ca8e5 100644 --- a/src/components/Exception/demo/500.md +++ b/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'; diff --git a/src/components/Exception/index.en-US.md b/src/components/Exception/index.en-US.md new file mode 100644 index 00000000..320b0e71 --- /dev/null +++ b/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' \ No newline at end of file diff --git a/src/components/Exception/index.md b/src/components/Exception/index.zh-CN.md similarity index 87% rename from src/components/Exception/index.md rename to src/components/Exception/index.zh-CN.md index 844146e0..13e4e7ef 100644 --- a/src/components/Exception/index.md +++ b/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' | -- GitLab