mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-16 01:41:02 +08:00
421 B
421 B
Checkbox 组
- order: 3
方便的生成一个 Checkbox 组。
import { Checkbox } from 'antd';
const CheckboxGroup = Checkbox.Group;
function onChange(checkedValues) {
console.log('checked = ', checkedValues);
}
ReactDOM.render(
<CheckboxGroup options={['Apple', 'Pear', 'Orange']} defaultValue={['Apple']} onChange={onChange} />
, document.getElementById('components-checkbox-demo-group'));