mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 17:59:33 +08:00
21 lines
292 B
Markdown
21 lines
292 B
Markdown
# 基本用法
|
|
|
|
- order: 0
|
|
|
|
简单的 checkbox。
|
|
|
|
---
|
|
|
|
````jsx
|
|
import { Checkbox } from 'antd';
|
|
|
|
function onChange(e) {
|
|
console.log(`checked = ${e.target.checked}`);
|
|
}
|
|
|
|
ReactDOM.render(<label>
|
|
<Checkbox defaultChecked={false} onChange={onChange} />
|
|
Checkbox
|
|
</label>, mountNode);
|
|
````
|