2016-03-31 09:40:55 +08:00
|
|
|
---
|
|
|
|
order: 3
|
2016-04-22 14:52:19 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 不可用状态
|
|
|
|
en-US: Disabled
|
2016-03-31 09:40:55 +08:00
|
|
|
---
|
2015-06-05 20:26:41 +08:00
|
|
|
|
2016-04-22 14:52:19 +08:00
|
|
|
## zh-CN
|
|
|
|
|
2015-10-30 17:00:06 +08:00
|
|
|
添加 `disabled` 属性即可让按钮处于不可用状态,同时按钮样式也会改变。
|
2015-06-05 20:26:41 +08:00
|
|
|
|
2016-04-22 14:52:19 +08:00
|
|
|
## en-US
|
|
|
|
|
2016-04-25 11:04:56 +08:00
|
|
|
To mark a button as disabled, add the `disabled` property to the `Button`.
|
2016-04-22 14:52:19 +08:00
|
|
|
|
2017-01-19 15:19:03 +08:00
|
|
|
````__react
|
2015-10-28 20:55:49 +08:00
|
|
|
import { Button } from 'antd';
|
2015-09-27 16:30:35 +08:00
|
|
|
|
2016-04-22 14:52:19 +08:00
|
|
|
ReactDOM.render(
|
|
|
|
<div>
|
|
|
|
<Button type="primary">Primary</Button>
|
|
|
|
<Button type="primary" disabled>Primary(disabled)</Button>
|
|
|
|
<br />
|
|
|
|
<Button>Default</Button>
|
|
|
|
<Button disabled>Default(disabled)</Button>
|
|
|
|
<br />
|
|
|
|
<Button type="ghost">Ghost</Button>
|
|
|
|
<Button type="ghost" disabled>Ghost(disabled)</Button>
|
|
|
|
<br />
|
|
|
|
<Button type="dashed">Dashed</Button>
|
|
|
|
<Button type="dashed" disabled>Dashed(disabled)</Button>
|
|
|
|
</div>,
|
|
|
|
mountNode
|
|
|
|
);
|
2015-06-05 20:26:41 +08:00
|
|
|
````
|