mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-26 18:08:34 +08:00
addc7bd266
* feat: rewrite component empty * refactor: use static variable * refactor: extraction function for component empty * docs: update docs and demo * feature: image add image style prop * docs: update doc of component empty * docs: add since comment to imageStyle prop * test: update snapshots * style: use number in style * docs: update docs of component empty * docs: update doc of component empty * test: fix test broken * docs: update docs for empty component * refactor: rewrite empty component * docs: update doc of component empty * doc: change image size
36 lines
626 B
Markdown
36 lines
626 B
Markdown
---
|
|
order: 2
|
|
title:
|
|
zh-CN: 自定义
|
|
en-US: Customize
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
自定义图片链接、图片大小、描述、附属内容。
|
|
|
|
## en-US
|
|
|
|
Customize image source, image size, description and extra content.
|
|
|
|
```jsx
|
|
import { Empty, Button } from 'antd';
|
|
|
|
ReactDOM.render(
|
|
<Empty
|
|
image="https://gw.alipayobjects.com/mdn/miniapp_social/afts/img/A*pevERLJC9v0AAAAAAAAAAABjAQAAAQ/original"
|
|
imageStyle={{
|
|
height: 200,
|
|
}}
|
|
description={
|
|
<span>
|
|
Customize <a href="#API">Description</a>
|
|
</span>
|
|
}
|
|
>
|
|
<Button type="primary">Create Now</Button>
|
|
</Empty>,
|
|
mountNode,
|
|
);
|
|
```
|