This commit is contained in:
Benjy Cui
2015-12-18 10:29:19 +08:00
parent 60e150d0a2
commit 2d007bf00e
8 changed files with 31 additions and 14 deletions
+5 -2
View File
@@ -20150,7 +20150,7 @@
var lowerOffset = this.calcOffset(lowerBound);
var handleClassName = prefixCls + '-handle';
var isNoTip = step === null && !tipFormatter;
var isNoTip = step === null || tipFormatter === null;
var upper = _react2['default'].createElement(_Handle2['default'], { className: handleClassName,
noTip: isNoTip, tipTransitionName: tipTransitionName, tipFormatter: tipFormatter,
@@ -20221,6 +20221,9 @@
onBeforeChange: noop,
onChange: noop,
onAfterChange: noop,
tipFormatter: function tipFormatter(value) {
return value;
},
included: true,
disabled: false,
dots: false,
@@ -22394,7 +22397,7 @@
overlay: _react2['default'].createElement(
'span',
null,
tipFormatter ? tipFormatter(value) : value
tipFormatter(value)
),
delay: 0,
transitionName: tipTransitionName },
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -2,7 +2,7 @@
<html>
<head>
<title>marks.js - example - rc-slider@3.2.0</title>
<title>marks.js - example - rc-slider@3.3.0</title>
<meta name="viewport"
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta charset="utf-8"/>
@@ -257,7 +257,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
<body>
<div class="container">
<div class="header">
<h1>rc-slider@3.2.0</h1>
<h1>rc-slider@3.3.0</h1>
<p>slider ui component for react</p>
</div>
+2 -2
View File
@@ -2,7 +2,7 @@
<html>
<head>
<title>range.js - example - rc-slider@3.2.0</title>
<title>range.js - example - rc-slider@3.3.0</title>
<meta name="viewport"
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta charset="utf-8"/>
@@ -257,7 +257,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
<body>
<div class="container">
<div class="header">
<h1>rc-slider@3.2.0</h1>
<h1>rc-slider@3.3.0</h1>
<p>slider ui component for react</p>
</div>
+6 -2
View File
@@ -2,7 +2,7 @@
<html>
<head>
<title>slider.js - example - rc-slider@3.2.0</title>
<title>slider.js - example - rc-slider@3.3.0</title>
<meta name="viewport"
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta charset="utf-8"/>
@@ -257,7 +257,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
<body>
<div class="container">
<div class="header">
<h1>rc-slider@3.2.0</h1>
<h1>rc-slider@3.3.0</h1>
<p>slider ui component for react</p>
</div>
@@ -352,6 +352,10 @@ ReactDOM.render(
<span class="hljs-tag">&lt;<span class="hljs-title">p</span>&gt;</span>Basic Slider with `tipFormatter`<span class="hljs-tag">&lt;/<span class="hljs-title">p</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">Slider</span> <span class="hljs-attribute">tipFormatter</span>=<span class="hljs-value">{percentFormatter}</span> <span class="hljs-attribute">tipTransitionName</span>=<span class="hljs-value">"rc-slider-tooltip-zoom-down"</span> <span class="hljs-attribute">onChange</span>=<span class="hljs-value">{log}</span> /&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">style</span>=<span class="hljs-value">{style}</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">p</span>&gt;</span>Basic Slider without tooltip<span class="hljs-tag">&lt;/<span class="hljs-title">p</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">Slider</span> <span class="hljs-attribute">tipFormatter</span>=<span class="hljs-value">{null}</span> <span class="hljs-attribute">onChange</span>=<span class="hljs-value">{log}</span> /&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">style</span>=<span class="hljs-value">{style}</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">p</span>&gt;</span>Controlled Slider<span class="hljs-tag">&lt;/<span class="hljs-title">p</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">Slider</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">{50}</span> /&gt;</span>
+10
View File
@@ -138,6 +138,16 @@ webpackJsonp([2],{
),
React.createElement(Slider, { tipFormatter: percentFormatter, tipTransitionName: 'rc-slider-tooltip-zoom-down', onChange: log })
),
React.createElement(
'div',
{ style: style },
React.createElement(
'p',
null,
'Basic Slider without tooltip'
),
React.createElement(Slider, { tipFormatter: null, onChange: log })
),
React.createElement(
'div',
{ style: style },
File diff suppressed because one or more lines are too long
+4 -4
View File
@@ -7,7 +7,7 @@
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.css" rel="stylesheet"/>
<title>rc-slider@3.2.0 - slider ui component for react</title>
<title>rc-slider@3.3.0 - slider ui component for react</title>
<style>
@font-face {
font-family: octicons-anchor;
@@ -737,7 +737,7 @@
<body>
<div class="header">
<h1>rc-slider@3.2.0</h1>
<h1>rc-slider@3.3.0</h1>
</div>
<div class="examples">
<h3>EXAMPLES</h3>
@@ -860,9 +860,9 @@ ReactDOM.render(<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-t
</tr>
<tr>
<td>tipFormatter</td>
<td>function</td>
<td>function or <code>null</code></td>
<td></td>
<td>Format the value of the tooltip if it shows.</td>
<td>Format the value of the tooltip if it shows. If <code>null</code> the tooltip will always be hidden.</td>
</tr>
<tr>
<td>dots</td>