ant-design/components/empty/demo/customize.md

36 lines
626 B
Markdown
Raw Normal View History

2018-12-26 16:01:00 +08:00
---
order: 2
title:
zh-CN: 自定义
en-US: Customize
---
## zh-CN
自定义图片链接、图片大小、描述、附属内容。
2018-12-26 16:01:00 +08:00
## en-US
Customize image source, image size, description and extra content.
2018-12-26 16:01:00 +08:00
```jsx
import { Empty, Button } from 'antd';
ReactDOM.render(
<Empty
2019-01-07 12:26:10 +08:00
image="https://gw.alipayobjects.com/mdn/miniapp_social/afts/img/A*pevERLJC9v0AAAAAAAAAAABjAQAAAQ/original"
imageStyle={{
height: 200,
}}
2018-12-26 16:01:00 +08:00
description={
<span>
Customize <a href="#API">Description</a>
</span>
}
>
2019-01-29 12:21:03 +08:00
<Button type="primary">Create Now</Button>
2018-12-26 16:01:00 +08:00
</Empty>,
mountNode,
2018-12-26 16:01:00 +08:00
);
```