2020-01-03 15:22:16 +08:00
|
|
|
---
|
|
|
|
order: 9
|
|
|
|
title:
|
|
|
|
zh-CN: 危险按钮
|
|
|
|
en-US: Danger Buttons
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
在 4.0 之后,危险成为一种按钮属性而不是按钮类型。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
`danger` is a property of button after antd 4.0.
|
|
|
|
|
|
|
|
```jsx
|
|
|
|
import { Button } from 'antd';
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<>
|
|
|
|
<Button type="primary" danger>
|
|
|
|
Primary
|
|
|
|
</Button>
|
|
|
|
<Button danger>Default</Button>
|
|
|
|
<Button type="dashed" danger>
|
2020-05-26 09:37:26 +08:00
|
|
|
Dashed
|
2020-01-03 15:22:16 +08:00
|
|
|
</Button>
|
2020-06-01 13:33:29 +08:00
|
|
|
<Button type="text" danger>
|
|
|
|
Text
|
|
|
|
</Button>
|
2020-01-03 15:22:16 +08:00
|
|
|
<Button type="link" danger>
|
2020-06-01 13:33:29 +08:00
|
|
|
Link
|
2020-01-03 15:22:16 +08:00
|
|
|
</Button>
|
|
|
|
</>,
|
|
|
|
mountNode,
|
|
|
|
);
|
|
|
|
```
|