ue-checkbox
1.0.3 • Public • Published
import CheckBox from 'ue-checkbox';
参数 |
说明 |
defaultChecked |
是否默认选中 |
checked |
是否选中 |
value |
checkbox 代表的值 |
onChange |
复选框点击时触发的函数 |
data |
携带数据 |
import React from 'react';
import CheckBox from 'ue-checkbox';
class Index extends Component {
constructor(props) {
super(props);
this.state = {
checked: false,
};
}
handleChange = (e) => {
const checked = e.target.checked;
const data = e.target.data;
}
render() {
return (
<CheckBox
checked={this.state.checked}
onChange={this.handleChange}
data={{ id: 10 }}
/>
)
}
}
Readme
Keywords
nonePackage Sidebar
Install
Weekly Downloads