diff --git a/src/components/Exception/demo/403.md b/src/components/Exception/demo/403.md index 85f0ad07284a998f5018b5b3df51842f8f347994..bb46037fea8daa2732c466c26c54f45a47d0fe22 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 6ff2de78d75d19b0fe63f918cd81023c28821a72..db50de653eb2acb08c5ed4a0aa83ee3ff73e3180 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 0ed9cedb5adc3a8a70ee1e77890c3e2bd599efa3..096ca8e511d2b19c952a68a9d1c8da606e747b28 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 0000000000000000000000000000000000000000..320b0e719887df81b4773b74859ac7b55f3de12d --- /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 844146e0a095358974577a10506c3e66b5aca0dc..13e4e7eff0d620f4bd40c0098d7226c871923d43 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' |