UNPKG

cjd-parkball

Version:

> 中后台业务组件库,中后台就像公园,进入需要买门票(登录),所以以 Parkball(公园球) 命名,公园内必定捕获!作为一个组件库,提供使用方法文档,方便开发者的调用

47 lines (36 loc) 977 B
--- category: 2 title: 基本 title_en: Basic --- zh-CN 基本滑动条。当 `range``true` 时,渲染为双滑块。当 `disabled``true` 时,滑块处于不可用状态。 en-US Basic slider. When `range` is `true`, display as dual thumb mode. When `disable` is `true`, the slider will not be interactable. ````jsx import { Slider, Switch } from 'parkball'; class Demo extends React.Component { state = { disabled: false, }; handleDisabledChange = (disabled) => { this.setState({ disabled }); } render() { const { disabled } = this.state; return ( <div> <Slider defaultValue={30} disabled={disabled} /> <Slider range defaultValue={[20, 50]} disabled={disabled} /> Disabled: <Switch size="small" checked={disabled} onChange={this.handleDisabledChange} /> </div> ); } } ReactDOM.render(<Demo />, mountNode); ```` <style> .code-box-demo .ant-slider { margin-bottom: 16px; } </style>