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

37 lines
847 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-02-13 10:55:53 +08:00
````jsx
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="dashed">Dashed</Button>
<Button type="dashed" disabled>Dashed(disabled)</Button>
2018-05-17 21:23:36 +08:00
<div style={{ padding: '8px 8px 0 8px', background: 'rgb(190, 200, 200)' }}>
<Button ghost>Ghost</Button>
<Button ghost disabled>Ghost(disabled)</Button>
</div>
</div>,
mountNode
);
````