2016-05-07 02:13:08 +08:00
|
|
|
---
|
|
|
|
order: 4
|
2018-07-12 11:35:50 +08:00
|
|
|
title:
|
2016-07-04 10:49:04 +08:00
|
|
|
zh-CN: 自定义时间轴点
|
|
|
|
en-US: Custom
|
2016-05-07 02:13:08 +08:00
|
|
|
---
|
|
|
|
|
2016-07-04 10:49:04 +08:00
|
|
|
## zh-CN
|
|
|
|
|
2016-05-07 02:13:08 +08:00
|
|
|
可以设置为图标或其他自定义元素。
|
|
|
|
|
2018-07-12 11:35:50 +08:00
|
|
|
## en-US
|
2016-07-04 10:49:04 +08:00
|
|
|
|
|
|
|
Set a node as an icon or other custom element.
|
|
|
|
|
2019-05-07 14:57:32 +08:00
|
|
|
```jsx
|
2019-08-13 14:07:17 +08:00
|
|
|
import { Timeline } from 'antd';
|
2019-11-28 12:34:33 +08:00
|
|
|
import { ClockCircleOutlined } from '@ant-design/icons';
|
2016-05-07 02:13:08 +08:00
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<Timeline>
|
2016-10-01 08:04:27 +08:00
|
|
|
<Timeline.Item>Create a services site 2015-09-01</Timeline.Item>
|
|
|
|
<Timeline.Item>Solve initial network problems 2015-09-01</Timeline.Item>
|
2020-04-28 11:16:01 +08:00
|
|
|
<Timeline.Item dot={<ClockCircleOutlined className="timeline-clock-icon" />} color="red">
|
2019-05-07 14:57:32 +08:00
|
|
|
Technical testing 2015-09-01
|
|
|
|
</Timeline.Item>
|
2016-10-01 08:04:27 +08:00
|
|
|
<Timeline.Item>Network problems being solved 2015-09-01</Timeline.Item>
|
2018-06-27 15:55:04 +08:00
|
|
|
</Timeline>,
|
2019-05-07 14:57:32 +08:00
|
|
|
mountNode,
|
2018-11-28 15:00:03 +08:00
|
|
|
);
|
2019-05-07 14:57:32 +08:00
|
|
|
```
|
2020-04-28 11:16:01 +08:00
|
|
|
|
|
|
|
```css
|
|
|
|
.timeline-clock-icon {
|
|
|
|
font-size: 16px;
|
|
|
|
}
|
|
|
|
|
|
|
|
[data-theme='compact'] .timeline-clock-icon {
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
```
|