|
@ -8,13 +8,13 @@ checkbox 组。 |
|
|
|
|
|
|
|
|
````jsx |
|
|
````jsx |
|
|
import { Checkbox } from 'antd'; |
|
|
import { Checkbox } from 'antd'; |
|
|
const CheckboxGroup = Checkbox.Group |
|
|
const CheckboxGroup = Checkbox.Group; |
|
|
|
|
|
|
|
|
function onChange(checkedValues) { |
|
|
function onChange(checkedValues) { |
|
|
console.log('checked = ', checkedValues); |
|
|
console.log('checked = ', checkedValues); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
ReactDOM.render(<label> |
|
|
ReactDOM.render(<label> |
|
|
<CheckboxGroup options={['apple','pear']}onChange={onChange} /> |
|
|
<CheckboxGroup options={["apple", "pear"]}onChange={onChange} /> |
|
|
</label>, document.getElementById('components-checkbox-demo-group')); |
|
|
</label>, document.getElementById('components-checkbox-demo-group')); |
|
|
```` |
|
|
```` |
|
|