You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
288 B

---
order: 0
title: 基本用法
---
10 years ago
简单的 checkbox。
````jsx
import { Checkbox } from 'antd';
9 years ago
function onChange(e) {
console.log(`checked = ${e.target.checked}`);
10 years ago
}
ReactDOM.render(
<Checkbox defaultChecked={false} onChange={onChange}>Checkbox</Checkbox>
, mountNode);
10 years ago
````