mirror of
https://github.com/wassname/slider.git
synced 2026-09-10 12:38:09 +08:00
update example
This commit is contained in:
+17
-5
@@ -5,11 +5,23 @@ require('rc-slider/assets/index.less');
|
||||
var Slider = require('rc-slider');
|
||||
var React = require('react');
|
||||
|
||||
function onChange(v){
|
||||
function onChange(v) {
|
||||
console.log(v);
|
||||
}
|
||||
|
||||
// React.render(<div style={{width:400,margin:100}}><Slider marks={["一","二","三","四","五"]} defaultIndex={2} /></div>, document.getElementById('__react-content'));
|
||||
// React.render(<div style={{width:400,margin:100}}><Slider withDots className='rc-slider' step={20}/></div>, document.getElementById('__react-content'));
|
||||
// React.render(<div style={{width:400,margin:100}}><Slider className='rc-slider' step={20}/></div>, document.getElementById('__react-content'));
|
||||
React.render(<div style={{width:400,margin:100}}><Slider onChange={onChange} tipTransitionName='rc-slider-tooltip-zoom-down'/></div>, document.getElementById('__react-content'));
|
||||
React.render(
|
||||
<div>
|
||||
<div style={{width:400,margin:100}}>
|
||||
<Slider onChange={onChange} tipTransitionName='rc-slider-tooltip-zoom-down'/>
|
||||
</div>
|
||||
<div style={{width:400,margin:100}}>
|
||||
<Slider marks={["一","二","三","四","五"]} defaultIndex={2}/>
|
||||
</div>
|
||||
<div style={{width:400,margin:100}}>
|
||||
<Slider withDots step={20}/>
|
||||
</div>
|
||||
<div style={{width:400,margin:100}}>
|
||||
<Slider step={20}/>
|
||||
</div>
|
||||
</div>
|
||||
, document.getElementById('__react-content'));
|
||||
|
||||
Reference in New Issue
Block a user