mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-07 20:08:21 +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
50 lines
792 B
Markdown
50 lines
792 B
Markdown
---
|
|
order: 1
|
|
title:
|
|
zh-CN: 基础列表
|
|
en-US: Basic list
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
基础列表。
|
|
|
|
## en-US
|
|
|
|
Basic list.
|
|
|
|
```jsx
|
|
import { List, Avatar } from 'antd';
|
|
|
|
const data = [
|
|
{
|
|
title: 'Ant Design Title 1',
|
|
},
|
|
{
|
|
title: 'Ant Design Title 2',
|
|
},
|
|
{
|
|
title: 'Ant Design Title 3',
|
|
},
|
|
{
|
|
title: 'Ant Design Title 4',
|
|
},
|
|
];
|
|
|
|
export default () => (
|
|
<List
|
|
itemLayout="horizontal"
|
|
dataSource={data}
|
|
renderItem={item => (
|
|
<List.Item>
|
|
<List.Item.Meta
|
|
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" />}
|
|
title={<a href="https://ant.design">{item.title}</a>}
|
|
description="Ant Design, a design language for background applications, is refined by Ant UED Team"
|
|
/>
|
|
</List.Item>
|
|
)}
|
|
/>
|
|
);
|
|
```
|