ctx.notification
Based on Ant Design Notification, this global notification API is used to display notification panels in the top-right corner of the page. Compared to ctx.message, notifications can include a title and description, making them suitable for content that needs to be displayed for a longer period or requires user attention.
Use Cases
Type Definition
NotificationInstance is the Ant Design notification interface, providing the following methods.
Common Methods
Configuration Parameters (Consistent with Ant Design notification):
Examples
Basic Usage
Shortcut Calls by Type
Custom Duration and Key
Close All Notifications
Difference from ctx.message
Related
- ctx.message - Top light hint, suitable for quick feedback
- ctx.modal - Modal confirmation, blocking interaction
- ctx.t() - Internationalization, often used in conjunction with notifications

