ant-design/components/checkbox/demo/group.md

21 lines
376 B
Markdown
Raw Normal View History

2015-12-24 15:03:06 +08:00
# 基本用法
- order: 3
checkbox 组。
---
````jsx
import { Checkbox } from 'antd';
const CheckboxGroup = Checkbox.Group
function onChange(checkedValues) {
console.log('checked = ', checkedValues);
}
ReactDOM.render(<label>
<CheckboxGroup options={['apple','pear']}onChange={onChange} />
</label>, document.getElementById('components-checkbox-demo-group'));
````