Notification 通知
右上角通知卡片,支持标题、描述、时长与类型。
基础用法
四种类型
自定义时长
自定义时长
清空全部
清空全部
API
方法
| 方法 | 说明 |
|---|---|
notification.info({ title, description?, duration? }) | 信息通知 |
notification.success({ title, description?, duration? }) | 成功通知 |
notification.warning({ title, description?, duration? }) | 警告通知 |
notification.error({ title, description?, duration? }) | 错误通知 |
destroyAllNotification() | 清空全部通知 |
duration默认4500ms,传0表示不自动关闭。- 右上角堆叠,
role="region"+aria-label="通知"。