mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-16 01:41:02 +08:00
6776bb8916
* docs: update demo * chore: add script * test: fix demo test * docs: convert demos * chore: move script * test: remove react-dom import * chore: update deps * docs: update riddle js * test: fix image test * docs: fix riddle demo
45 lines
925 B
Markdown
45 lines
925 B
Markdown
---
|
|
order: 9
|
|
title:
|
|
zh-CN: 支持更多内容配置
|
|
en-US: Support more content configuration
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
一种支持封面、头像、标题和描述信息的卡片。
|
|
|
|
## en-US
|
|
|
|
A Card that supports `cover`, `avatar`, `title` and `description`.
|
|
|
|
```jsx
|
|
import { Card, Avatar } from 'antd';
|
|
import { EditOutlined, EllipsisOutlined, SettingOutlined } from '@ant-design/icons';
|
|
|
|
const { Meta } = Card;
|
|
|
|
export default () => (
|
|
<Card
|
|
style={{ width: 300 }}
|
|
cover={
|
|
<img
|
|
alt="example"
|
|
src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
|
|
/>
|
|
}
|
|
actions={[
|
|
<SettingOutlined key="setting" />,
|
|
<EditOutlined key="edit" />,
|
|
<EllipsisOutlined key="ellipsis" />,
|
|
]}
|
|
>
|
|
<Meta
|
|
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" />}
|
|
title="Card title"
|
|
description="This is the description"
|
|
/>
|
|
</Card>
|
|
);
|
|
```
|