mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 05:29:37 +08:00
Merge branch 'develop-0.10.0' of github.com:ant-design/ant-design into develop-0.10.0
This commit is contained in:
commit
ab4cd86221
18
components/slider/demo/range.md
Normal file
18
components/slider/demo/range.md
Normal file
@ -0,0 +1,18 @@
|
||||
# 双滑块
|
||||
|
||||
- order: 4
|
||||
|
||||
设置 `range` 为 `true`,将会渲染两个滑块,此时应用 `defaultValues` `values` 设置滑块的值,而非 `defaultValue` `values`。
|
||||
|
||||
---
|
||||
|
||||
````jsx
|
||||
import { Slider } from 'antd';
|
||||
|
||||
ReactDOM.render(
|
||||
<div>
|
||||
<Slider range={true} defaultValues={[0, 30]} />
|
||||
<Slider range={true} step={10} values={[20, 50]} />
|
||||
</div>
|
||||
, document.getElementById('components-slider-demo-range'));
|
||||
````
|
@ -19,10 +19,12 @@
|
||||
| min | Number | 0 | 最小值
|
||||
| max | Number | 100 | 最大值
|
||||
| step | Number | 1 | 步长,取值必须大于 0,并且可被 (max - min) 整除
|
||||
| value | Number | | 当前取值
|
||||
| defaultValue | Number | 0 | 初始取值
|
||||
| marks | Array | [] | 分段标记,标记每一个 step,如果 step 属性没有定义,则 `marks` 属性会被忽略
|
||||
| value | Number | | 当 `range` 为 `false` 时,设置当前取值
|
||||
| values | [Number, Number] | | 当 `range` 为 `true` 时,设置当前取值
|
||||
| defaultValue | Number | 0 | 当 `range` 为 `false` 时,设置初始取值
|
||||
| defaultValues | [Number, Number] | [0, 0] | 当 `range` 为 `true` 时,设置初始取值
|
||||
| marks | Array | [] | 分段标记,标记每一个 step,如果 step 属性没有定义,则 `marks` 属性会被忽略。当 `range` 为 `true` 时,忽略该属性
|
||||
| isIncluded | Boolean | true | 分段式滑块,值为 true 时表示值为包含关系,false 表示并列
|
||||
| index | Number | | 为具备 `step` 或者 `marks` 的 slider 提供滑块操作的当前位置
|
||||
| defaultIndex | Number | 0 | 为具备 `step` 或者 `marks` 的 slider 提供滑块操作的初始位置
|
||||
| index | Number | | 为具备 `step` 或者 `marks` 的 slider 提供滑块操作的当前位置。当 `range` 为 `true` 时,忽略该属性
|
||||
| defaultIndex | Number | 0 | 为具备 `step` 或者 `marks` 的 slider 提供滑块操作的初始位置。当 `range` 为 `true` 时,忽略该属性
|
||||
| disabled | Boolean | false | 值为 `true` 时,滑块为 disable 禁用状态
|
||||
|
@ -45,14 +45,14 @@
|
||||
"rc-dropdown": "~1.4.0",
|
||||
"rc-form-validation": "~2.4.7",
|
||||
"rc-input-number": "~2.3.0",
|
||||
"rc-menu": "~4.6.2",
|
||||
"rc-notification": "~1.1.0",
|
||||
"rc-menu": "~4.7.0",
|
||||
"rc-notification": "~1.2.0",
|
||||
"rc-pagination": "~1.1.0",
|
||||
"rc-progress": "~1.0.0",
|
||||
"rc-queue-anim": "~0.10.5",
|
||||
"rc-radio": "~2.0.0",
|
||||
"rc-select": "~5.0.0",
|
||||
"rc-slider": "~1.5.0",
|
||||
"rc-slider": "~1.6.0",
|
||||
"rc-steps": "~1.4.0",
|
||||
"rc-switch": "~1.2.0",
|
||||
"rc-table": "~3.4.0",
|
||||
|
Loading…
Reference in New Issue
Block a user