Message
Display global messages as feedback in response to user operations.
Display normal message
SnMessage.info({
content: 'This is a normal message'
})
info
success
danger
warning
SnMessage.info({
content: 'This is a info message'
});
SnMessage.success({
content: 'This is a success message'
});
SnMessage.danger({
content: 'This is a danger message'
});
SnMessage.warning({
content: 'This is a warning message'
});
Customized display duration
SnMessage.info({
content: 'This is a prompt message for success, and it will disappear in 10 seconds',
duration: 10000,
})
API
SnMessage
info, success, danger, warning
Property | Description | Type | Default |
---|---|---|---|
content | Message text content | string | - |
duration | time duration | integer | 6000 |
Custom Message
SnMessage.message(message, time, addClass = 'default', type = 'question')
Property | Description | Type | Default |
---|---|---|---|
message | Message text content | string | - |
time | time duration | integer | 20000 |
addClass | custom class name | string | default |
type | Sedna icon | string | question |