ant-design/components/button/demo/disabled.md

36 lines
780 B
Markdown
Raw Normal View History

2016-03-31 09:40:55 +08:00
---
order: 3
title:
zh-CN: 不可用状态
en-US: Disabled
2016-03-31 09:40:55 +08:00
---
## zh-CN
2015-10-30 17:00:06 +08:00
添加 `disabled` 属性即可让按钮处于不可用状态,同时按钮样式也会改变。
## en-US
2016-04-25 11:04:56 +08:00
To mark a button as disabled, add the `disabled` property to the `Button`.
2017-01-19 15:19:03 +08:00
````__react
import { Button } from 'antd';
2015-09-27 16:30:35 +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
);
````