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

29 lines
557 B
Markdown
Raw Normal View History

2015-07-13 08:00:31 +08:00
# 基本
- order: 0
2015-11-18 16:56:22 +08:00
基本滑动条。当 `range``true` 时,渲染为双滑块。当 `disabled``true` 时,滑块处于不可用状态。
2015-07-13 08:00:31 +08:00
---
````jsx
import { Slider } from 'antd';
2015-07-13 08:00:31 +08:00
2015-10-20 16:47:55 +08:00
ReactDOM.render(<div>
2015-11-18 16:56:22 +08:00
<Slider defaultValue={30} />
<Slider range defaultValue={[20, 50]} />
<Slider range defaultValue={[20, 50]} disabled />
2015-07-14 12:06:44 +08:00
</div>
2015-07-13 08:00:31 +08:00
, document.getElementById('components-slider-demo-basic'));
````
2015-07-14 12:06:44 +08:00
<style>
2015-07-16 16:48:06 +08:00
.code-box-demo .ant-slider {
margin-bottom: 50px;
}
2015-11-18 16:56:22 +08:00
.code-box-demo .ant-slider:last-child {
2015-11-18 17:50:22 +08:00
margin-bottom: 10px;
2015-11-18 16:56:22 +08:00
}
2015-07-16 16:48:06 +08:00
</style>