From 235de436053d742f278edd6dd1ab536cec190d80 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Tue, 22 Mar 2016 17:50:21 +0800 Subject: [PATCH] deps: upgrade rc-slider --- components/slider/demo/mark.md | 7 ++++++- components/slider/index.md | 2 +- package.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/components/slider/demo/mark.md b/components/slider/demo/mark.md index 0f10d8e1d5..a5c289b07e 100644 --- a/components/slider/demo/mark.md +++ b/components/slider/demo/mark.md @@ -13,7 +13,12 @@ const marks = { 0: '0°C', 26: '26°C', 37: '37°C', - 100: '100°C' + 100: { + style: { + color: 'red', + }, + label: 100°C, + }, }; ReactDOM.render( diff --git a/components/slider/index.md b/components/slider/index.md index 7a2d7b1657..2583c08287 100644 --- a/components/slider/index.md +++ b/components/slider/index.md @@ -20,7 +20,7 @@ | min | Number | 0 | 最小值 | max | Number | 100 | 最大值 | step | Number or null | 1 | 步长,取值必须大于 0,并且可被 (max - min) 整除。当 `marks` 不为空对象时,可以设置 `step` 为 `null`,此时 Slider 的可选值仅有 marks 标出来的部分。 -| marks | Object {Number: String} | {} | 刻度标记,key 的类型必须为 `Number` 且取值在闭区间 [min, max] 内 +| marks | Object{Number: String|React.Component} or Object{Number: { style, label}} | {} | 刻度标记,key 的类型必须为 `Number` 且取值在闭区间 [min, max] 内,每个标签可以单独设置样式 | dots | Boolean | false | 是否只能拖拽到刻度上 | value | Number or [Number, Number]| | 设置当前取值。当 `range` 为 `false` 时,使用 `Number`,否则用 `[Number, Number]` | defaultValue | Number or [Number, Number]| 0 or [0, 0] | 设置初始取值。当 `range` 为 `false` 时,使用 `Number`,否则用 `[Number, Number]` diff --git a/package.json b/package.json index 2a4b99d4ab..6501798989 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "rc-queue-anim": "~0.11.2", "rc-radio": "~2.0.0", "rc-select": "~5.10.0", - "rc-slider": "~3.3.0", + "rc-slider": "^3.5.1", "rc-steps": "~1.4.1", "rc-switch": "~1.3.2", "rc-table": "~3.11.1",