@@ -310,7 +310,7 @@ Customize Notification's offset from the edge of the screen.
exportdefault{
methods:{
open11(){
this.$notify({
this.$notify.success({
title:'Success',
message:'This is a success message',
offset:100
...
...
@@ -351,7 +351,11 @@ Customize Notification's offset from the edge of the screen.
```
:::
### Hide Close button
:::warning
Although `message` property supports HTML strings, dynamically rendering arbitrary HTML on your website can be very dangerous because it can easily lead to [XSS attacks](https://en.wikipedia.org/wiki/Cross-site_scripting). So when `dangerouslyUseHTMLString` is on, please make sure the content of `message` is trusted, and **never** assign `message` to user-provided content.
:::
### Hide close button
It is possible to hide the close button
...
...
@@ -381,10 +385,6 @@ It is possible to hide the close button
```
:::
:::warning
Although `message` property supports HTML strings, dynamically rendering arbitrary HTML on your website can be very dangerous because it can easily lead to [XSS attacks](https://en.wikipedia.org/wiki/Cross-site_scripting). So when `dangerouslyUseHTMLString` is on, please make sure the content of `message` is trusted, and **never** assign `message` to user-provided content.
:::
### Global method
Element has added a global method `$notify` for Vue.prototype. So in a vue instance you can call `Notification` like what we did in this page.
...
...
@@ -415,7 +415,7 @@ In this case you should call `Notification(options)`. We have also registered me
| offset | offset from the top edge of the screen. Every Notification instance of the same moment should have the same offset | number | — | 0 |
### Methods
`Notification` and `this.$notify` returns the current Message instance. To manually close the instance, you can call `close` on it.
`Notification` and `this.$notify` returns the current Notification instance. To manually close the instance, you can call `close` on it.