2015-09-07 12:32:31 +08:00
|
|
|
# 错误或失败
|
2015-07-11 16:40:59 +08:00
|
|
|
|
|
|
|
- order: 1
|
|
|
|
|
2015-09-07 12:32:31 +08:00
|
|
|
操作失败反馈。
|
2015-07-11 16:40:59 +08:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
````jsx
|
2015-10-28 20:55:49 +08:00
|
|
|
import { message, Button } from 'antd';
|
2015-07-11 16:40:59 +08:00
|
|
|
|
2015-10-28 20:55:49 +08:00
|
|
|
const error = function() {
|
2015-07-11 16:40:59 +08:00
|
|
|
message.error('这是一条失败的提示这是一条失败的提示这是一条失败的提示');
|
2015-07-11 18:00:58 +08:00
|
|
|
};
|
2015-07-11 16:40:59 +08:00
|
|
|
|
2015-10-20 16:47:55 +08:00
|
|
|
ReactDOM.render(<Button type="primary" onClick={error}>显示失败提示</Button>
|
2015-07-11 18:00:58 +08:00
|
|
|
, document.getElementById('components-message-demo-error'));
|
|
|
|
````
|