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.
|
|
|
# Message
|
|
|
|
|
|
|
|
- category: Components
|
|
|
|
- chinese: 全局提示
|
|
|
|
- order: 4
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
全局展示操作反馈信息。
|
|
|
|
|
|
|
|
## 何时使用
|
|
|
|
|
|
|
|
- 可提供成功、警告和错误等反馈信息。
|
|
|
|
- 顶部居中显示并自动消失,是一种不打断用户操作的轻量级提示方式。
|
|
|
|
|
|
|
|
## API
|
|
|
|
|
|
|
|
- `message.success(content, duration)`
|
|
|
|
- `message.error(content, duration)`
|
|
|
|
- `message.info(content, duration)`
|
|
|
|
|
|
|
|
组件提供了三个静态方法,参数如下:
|
|
|
|
|
|
|
|
| 参数 | 说明 | 类型 | 默认值 |
|
|
|
|
|------------|----------------|----------------------------|--------------|
|
|
|
|
| content | 提示内容 | React.Element or String | 无 |
|
|
|
|
| duration | 自动关闭的延时 | number | 1.5 |
|