📝 Improve Empty doc

This commit is contained in:
afc163 2019-04-02 10:26:45 +08:00
parent dfc8b97717
commit 0bf222c664
No known key found for this signature in database
GPG Key ID: 738F973FCE5C6B48
3 changed files with 26 additions and 26 deletions

View File

@ -7,11 +7,11 @@ title:
## zh-CN
可以通过设置 image 为 Empty.PRESENTED_IMAGE_SIMPLE 选择另一种风格的图片。
可以通过设置 `image``Empty.PRESENTED_IMAGE_SIMPLE` 选择另一种风格的图片。
## en-US
You can choose another style of image by setting image to Empty.PRESENTED_IMAGE_SIMPLE
You can choose another style of `image` by setting image to `Empty.PRESENTED_IMAGE_SIMPLE`.
```jsx
import { Empty } from 'antd';

View File

@ -9,19 +9,8 @@ Empty state placeholder.
## When To Use
When there is no data provided, display for friendly tips.
## Built-in image
+ Empty.PRESENTED_IMAGE_SIMPLE
<img src="https://user-images.githubusercontent.com/507615/54591679-b0ceb580-4a65-11e9-925c-ad15b4eae93d.png" height="35px">
+ Empty.PRESENTED_IMAGE_DEFAULT
<img src="https://user-images.githubusercontent.com/507615/54591670-ac0a0180-4a65-11e9-846c-e55ffce0fe7b.png" height="100px">
- When there is no data provided, display for friendly tips.
- User tutorial to create something in fresh new situation.
## API
@ -36,3 +25,13 @@ When there is no data provided, display for friendly tips.
| description | Customize description | string \| ReactNode | - |
| imageStyle | style of image | CSSProperties | - |
| image | Customize image. Will tread as image url when string provided. | string \| ReactNode | `Empty.PRESENTED_IMAGE_DEFAULT` |
## Built-in images
+ Empty.PRESENTED_IMAGE_SIMPLE
<img src="https://user-images.githubusercontent.com/507615/54591679-b0ceb580-4a65-11e9-925c-ad15b4eae93d.png" height="35px">
+ Empty.PRESENTED_IMAGE_DEFAULT
<img src="https://user-images.githubusercontent.com/507615/54591670-ac0a0180-4a65-11e9-846c-e55ffce0fe7b.png" height="100px">

View File

@ -10,17 +10,8 @@ cols: 1
## 何时使用
当目前没有数据时,用于显式的用户提示。
## 内置图片 (3.16.0 以上版本)
+ Empty.PRESENTED_IMAGE_SIMPLE
<img src="https://user-images.githubusercontent.com/507615/54591679-b0ceb580-4a65-11e9-925c-ad15b4eae93d.png" height="35px">
+ Empty.PRESENTED_IMAGE_DEFAULT
<img src="https://user-images.githubusercontent.com/507615/54591670-ac0a0180-4a65-11e9-846c-e55ffce0fe7b.png" height="100px">
- 当目前没有数据时,用于显式的用户提示。
- 初始化场景时的引导创建流程。
## API
@ -35,3 +26,13 @@ cols: 1
| description | 自定义描述内容 | string \| ReactNode | - |
| imageStyle | 图片样式 | CSSProperties | - |
| image | 设置显示图片,为 string 时表示自定义图片地址。 | string \| ReactNode | `Empty.PRESENTED_IMAGE_DEFAULT` |
## 内置图片 (3.16.0 以上版本)
+ Empty.PRESENTED_IMAGE_SIMPLE
<img src="https://user-images.githubusercontent.com/507615/54591679-b0ceb580-4a65-11e9-925c-ad15b4eae93d.png" height="35px">
+ Empty.PRESENTED_IMAGE_DEFAULT
<img src="https://user-images.githubusercontent.com/507615/54591670-ac0a0180-4a65-11e9-846c-e55ffce0fe7b.png" height="100px">