mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 03:29:59 +08:00
Merge pull request #577 from ant-design/deps-slider
deps: update rc-slider and demo
This commit is contained in:
commit
561b8a8083
@ -9,7 +9,7 @@
|
||||
````jsx
|
||||
import { Slider, InputNumber } from 'antd';
|
||||
|
||||
const Test = React.createClass({
|
||||
const IntegerStep = React.createClass({
|
||||
getInitialState() {
|
||||
return {
|
||||
inputValue: 1
|
||||
@ -35,5 +35,34 @@ const Test = React.createClass({
|
||||
}
|
||||
});
|
||||
|
||||
ReactDOM.render(<Test />, document.getElementById('components-slider-demo-input-number'));
|
||||
const DecimalStep = React.createClass({
|
||||
getInitialState() {
|
||||
return {
|
||||
inputValue: 0
|
||||
};
|
||||
},
|
||||
onChange(value) {
|
||||
this.setState({
|
||||
inputValue: value
|
||||
});
|
||||
},
|
||||
render() {
|
||||
return (
|
||||
<div className="row">
|
||||
<div className="col-12">
|
||||
<Slider min={0} max={1} onChange={this.onChange} value={this.state.inputValue} step={0.01} />
|
||||
</div>
|
||||
<div className="col-4">
|
||||
<InputNumber min={0} max={1} style={{marginLeft: '16px'}} step={0.01}
|
||||
value={this.state.inputValue} onChange={this.onChange} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
ReactDOM.render(<div>
|
||||
<IntegerStep />
|
||||
<DecimalStep />
|
||||
</div>, document.getElementById('components-slider-demo-input-number'));
|
||||
````
|
||||
|
@ -52,7 +52,7 @@
|
||||
"rc-queue-anim": "~0.11.2",
|
||||
"rc-radio": "~2.0.0",
|
||||
"rc-select": "~5.1.2",
|
||||
"rc-slider": "~3.1.0",
|
||||
"rc-slider": "~3.1.2",
|
||||
"rc-steps": "~1.4.1",
|
||||
"rc-switch": "~1.3.1",
|
||||
"rc-table": "~3.6.1",
|
||||
|
Loading…
Reference in New Issue
Block a user