ddcat1115 7 лет назад
Родитель
Сommit
b07d8cb3b8

+ 11 - 3
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(

+ 9 - 1
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';
 

+ 9 - 1
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 - 0
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'

+ 2 - 4
src/components/Exception/index.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' |