2017-08-09 14:34:10 +08:00
|
|
|
---
|
|
|
|
order: 9
|
|
|
|
title:
|
|
|
|
zh-CN: 支持更多内容配置
|
|
|
|
en-US: Support more content configuration
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
一种支持封面、头像、标题和描述信息的卡片。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
A Card that supports `cover`, `avatar`, `title` and `description`.
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
```tsx
|
2019-11-28 12:34:33 +08:00
|
|
|
import { EditOutlined, EllipsisOutlined, SettingOutlined } from '@ant-design/icons';
|
2022-05-23 14:37:16 +08:00
|
|
|
import { Avatar, Card } from 'antd';
|
|
|
|
import React from 'react';
|
2018-06-27 15:55:04 +08:00
|
|
|
|
2017-08-09 14:34:10 +08:00
|
|
|
const { Meta } = Card;
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => (
|
2017-08-09 14:34:10 +08:00
|
|
|
<Card
|
|
|
|
style={{ width: 300 }}
|
2019-05-07 14:57:32 +08:00
|
|
|
cover={
|
|
|
|
<img
|
|
|
|
alt="example"
|
|
|
|
src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
|
|
|
|
/>
|
|
|
|
}
|
2019-11-28 12:34:33 +08:00
|
|
|
actions={[
|
|
|
|
<SettingOutlined key="setting" />,
|
|
|
|
<EditOutlined key="edit" />,
|
|
|
|
<EllipsisOutlined key="ellipsis" />,
|
|
|
|
]}
|
2017-08-09 14:34:10 +08:00
|
|
|
>
|
|
|
|
<Meta
|
2021-10-14 12:09:07 +08:00
|
|
|
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" />}
|
2017-08-09 14:34:10 +08:00
|
|
|
title="Card title"
|
|
|
|
description="This is the description"
|
|
|
|
/>
|
2022-04-03 23:27:45 +08:00
|
|
|
</Card>
|
2018-11-28 15:00:03 +08:00
|
|
|
);
|
2022-05-19 09:46:26 +08:00
|
|
|
|
|
|
|
export default App;
|
2019-05-07 14:57:32 +08:00
|
|
|
```
|