You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
---
|
|
|
|
order: 3
|
|
|
|
title:
|
|
|
|
zh-CN: 不可用状态
|
|
|
|
en-US: Disabled
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
添加 `disabled` 属性即可让按钮处于不可用状态,同时按钮样式也会改变。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
To mark a button as disabled, add the `disabled` property to the `Button`.
|
|
|
|
|
|
|
|
````jsx
|
|
|
|
import { Button } from 'antd';
|
|
|
|
|
|
|
|
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>Ghost</Button>
|
|
|
|
<Button disabled>Ghost(disabled)</Button>
|
|
|
|
<br />
|
|
|
|
<Button type="dashed">Dashed</Button>
|
|
|
|
<Button type="dashed" disabled>Dashed(disabled)</Button>
|
|
|
|
</div>,
|
|
|
|
mountNode
|
|
|
|
);
|
|
|
|
````
|