Message Library: Event and Method Usage Examples
Category: ExamplesThe Message module displays real-time status notifications, including success, error, information, question, and warning types. It features:Large icon/title mode for emphasis;9 customizable display positions;HTML text support
Manual Close
Disable Progress Bar
Since messages are meant to be temporary, they auto-close by default with a countdown progress bar as a visual indicator.
Hide Close Button
To hide the close button in the top-right corner, set closable:false
. In this case, there are two ways to close the message:
Rich Content
The content
parameter supports HTML tags in addition to plain text, allowing custom message structures.
Update Content
Create a single message instance and update its content using updateCont
.
Update Parameters
Create a single message instance and update both content and status using update
.
Default Headings and Content
Event Listeners
Common event listeners include:
- initiated: Triggers on initialization
- shown: Triggers when displayed
- hidden: Triggers when hidden