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
316 B
19 lines
316 B
10 years ago
|
# 基本用法
|
||
|
|
||
|
- order: 0
|
||
|
|
||
|
简单的 switch。
|
||
|
|
||
|
---
|
||
|
|
||
|
````jsx
|
||
|
var Switch = antd.Switch;
|
||
|
var container = document.getElementById('components-switch-demo-basic');
|
||
|
|
||
|
function onChange(checked){
|
||
|
console.log('switch to ' + checked);
|
||
|
}
|
||
|
|
||
|
React.render(<Switch defaultChecked={false} onChange={onChange}/>, container);
|
||
|
````
|