2015-06-17 18:22:20 +08:00
|
|
|
# 按钮尺寸
|
2015-06-05 20:26:41 +08:00
|
|
|
|
2015-06-17 18:22:20 +08:00
|
|
|
- order: 2
|
2015-06-05 20:26:41 +08:00
|
|
|
|
2015-09-27 16:30:35 +08:00
|
|
|
按钮有大、中、小三种尺寸。
|
2015-06-07 14:03:00 +08:00
|
|
|
|
2015-10-22 21:01:52 +08:00
|
|
|
通过设置 `size` 为 `large` `small` 分别把按钮设为大、小尺寸。若不设置 `size`,则尺寸为中。
|
2015-06-05 20:26:41 +08:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2015-09-27 16:30:35 +08:00
|
|
|
````jsx
|
2015-10-28 20:55:49 +08:00
|
|
|
import { Button } from 'antd';
|
2015-09-27 16:30:35 +08:00
|
|
|
|
2015-10-20 16:47:55 +08:00
|
|
|
ReactDOM.render(<div>
|
2015-10-22 21:01:52 +08:00
|
|
|
<Button type="primary" size="large">大号按钮</Button>
|
2015-09-27 16:30:35 +08:00
|
|
|
<Button type="primary">中号按钮(默认)</Button>
|
2015-10-22 21:01:52 +08:00
|
|
|
<Button type="primary" size="small">小号按钮</Button>
|
2015-09-27 16:30:35 +08:00
|
|
|
</div>
|
|
|
|
, document.getElementById('components-button-demo-size'));
|
2015-06-05 20:26:41 +08:00
|
|
|
````
|
2015-09-27 16:30:35 +08:00
|
|
|
|
|
|
|
<style>
|
|
|
|
#components-button-demo-size .ant-btn {
|
|
|
|
margin-right: 8px;
|
|
|
|
}
|
|
|
|
</style>
|