ant-design/components/slider/demo/mark.md

21 lines
522 B
Markdown
Raw Normal View History

2015-07-13 08:00:31 +08:00
# 分段式滑块
- order: 3
使用 `marks` 属性标注分段式滑块,结合 `index` 可以指定滑块按钮初始位置。
---
````jsx
import { Slider } from 'antd';
2015-07-13 08:00:31 +08:00
2015-10-20 16:47:55 +08:00
ReactDOM.render(
2015-07-14 12:06:44 +08:00
<div className="sliderContainer">
<p>包含关系</p>
2015-07-21 00:10:13 +08:00
<Slider marks={["状态1","状态2","状态3","状态4"]} defaultIndex={1} />
2015-07-14 12:06:44 +08:00
<p>并列关系</p>
2015-07-21 00:10:13 +08:00
<Slider marks={["状态1","状态2","状态3","状态4"]} isIncluded={false} defaultIndex={1} />
2015-07-14 12:06:44 +08:00
</div>
2015-07-13 08:00:31 +08:00
, document.getElementById('components-slider-demo-mark'));
````