2016-03-31 09:40:55 +08:00
|
|
|
---
|
|
|
|
order: 3
|
2016-07-26 09:17:46 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 两种大小
|
|
|
|
en-US: Two sizes
|
2016-03-31 09:40:55 +08:00
|
|
|
---
|
2015-12-06 16:39:01 +08:00
|
|
|
|
2016-07-26 09:17:46 +08:00
|
|
|
## zh-CN
|
|
|
|
|
2015-12-06 16:39:01 +08:00
|
|
|
`size="small"` 表示小号开关。
|
|
|
|
|
2016-07-26 09:17:46 +08:00
|
|
|
## en-US
|
|
|
|
|
|
|
|
`size="small"` represents a small sized switch.
|
|
|
|
|
2019-05-07 14:57:32 +08:00
|
|
|
```jsx
|
2015-12-06 16:39:01 +08:00
|
|
|
import { Switch } from 'antd';
|
|
|
|
|
|
|
|
ReactDOM.render(
|
2020-07-07 23:04:27 +08:00
|
|
|
<>
|
2017-12-06 20:20:32 +08:00
|
|
|
<Switch defaultChecked />
|
2016-10-21 11:09:24 +08:00
|
|
|
<br />
|
2017-12-06 20:20:32 +08:00
|
|
|
<Switch size="small" defaultChecked />
|
2020-07-07 23:04:27 +08:00
|
|
|
</>,
|
2019-05-07 14:57:32 +08:00
|
|
|
mountNode,
|
2018-11-28 15:00:03 +08:00
|
|
|
);
|
2019-05-07 14:57:32 +08:00
|
|
|
```
|