Browse Source

chore demo code style

pull/11581/head
afc163 6 years ago
parent
commit
471f9409f9
  1. 16
      components/slider/demo/input-number.md

16
components/slider/demo/input-number.md

@ -28,17 +28,18 @@ class IntegerStep extends React.Component {
}
render() {
const { inputValue } = this.state;
return (
<Row>
<Col span={12}>
<Slider min={1} max={20} onChange={this.onChange} value={this.state.inputValue} />
<Slider min={1} max={20} onChange={this.onChange} value={inputValue} />
</Col>
<Col span={4}>
<InputNumber
min={1}
max={20}
style={{ marginLeft: 16 }}
value={this.state.inputValue}
value={inputValue}
onChange={this.onChange}
/>
</Col>
@ -59,10 +60,17 @@ class DecimalStep extends React.Component {
}
render() {
const { inputValue } = this.state;
return (
<Row>
<Col span={12}>
<Slider min={0} max={1} onChange={this.onChange} value={this.state.inputValue} step={0.01} />
<Slider
min={0}
max={1}
onChange={this.onChange}
value={inputValue}
step={0.01}
/>
</Col>
<Col span={4}>
<InputNumber
@ -70,7 +78,7 @@ class DecimalStep extends React.Component {
max={1}
style={{ marginLeft: 16 }}
step={0.01}
value={this.state.inputValue}
value={inputValue}
onChange={this.onChange}
/>
</Col>

Loading…
Cancel
Save