1.2.1 • Published 7 years ago
switch-react v1.2.1
Use
- install
npm install --save-dev switch-react css-loader style-loader
- webpack.config.js
Add loader
{ test: /\.css$/, loader: 'style-loader!css-loader'//添加对样式表的处理 }
- import
import VerificationCode from "switch-react"
- propertys
<Switch
onName="车架号"
offName="零件号"
isOff={_isOff}
click={() => this.setState({isOff: !_isOff})} />
It is big with parent component
Propertys
Property | How |
---|---|
onName | left name |
offName | right name |
isOff | bool: show or not |
click | circle clicked |