UNPKG

yylib-quick-mobile

Version:

yylib-quick-mobile

43 lines (41 loc) 1.37 kB
import React from 'react' import {YYSlider, YYForm} from '../../../index' import {Button,WingBlank,Slider} from 'antd-mobile'; class YYSliderDemo extends React.Component { Change = (val) => { console.log(val); } log = (name) => { return (value) => { console.log(`${name}: ${value}`); }; } render() { const {form} = this.props; return ( <div> <WingBlank size="lg"> <p className="sub-title">Slider</p> <Slider style={{ marginLeft: 30, marginRight: 30 }} defaultValue={26} min={0} max={30} onChange={this.log('change')} onAfterChange={this.log('afterChange')} /> </WingBlank> <p className="sub-title">Slider</p> <YYSlider style={{ marginLeft: 30, marginRight: 30 }} defaultValue={26} min={0} max={30} onChange={this.log('change')} onAfterChange={this.log('afterChange')} /> </div> ) } } export default YYSliderDemo;