diff --git a/examples/docs/en-US/notification.md b/examples/docs/en-US/notification.md index 796a6d1e3..dd17ff0aa 100644 --- a/examples/docs/en-US/notification.md +++ b/examples/docs/en-US/notification.md @@ -2,9 +2,11 @@ module.exports = { methods: { open() { + const h = this.$createElement; + this.$notify({ title: 'Title', - message: 'This is a reminder' + message: h('p', { style: 'color: red' }, 'This is a reminder') }); }, @@ -61,14 +63,14 @@ }; -## Notification +## Notification Displays a global notification message at the upper right corner of the page. ### Basic usage ::: demo Element has registered the `$notify` method and it receives an object as its parameter. In the simplest case, you can set the `title` field and the` message` field for the title and body of the notification. By default, the notification automatically closes after 4500ms, but by setting `duration` you can control its duration. Specifically, if set to `0`, it will not close automatically. Note that `duration` receives a `Number` in milliseconds. - + ```html