diff --git a/examples/docs/en-US/notification.md b/examples/docs/en-US/notification.md
index 80261ff48..5f143e82e 100644
--- a/examples/docs/en-US/notification.md
+++ b/examples/docs/en-US/notification.md
@@ -80,7 +80,7 @@
},
open11() {
- this.$notify({
+ this.$notify.success({
title: 'Success',
message: 'This is a success message',
offset: 100
@@ -310,7 +310,7 @@ Customize Notification's offset from the edge of the screen.
export default {
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.
| Method | Description |
| ---- | ---- |
| close | close the Notification |
diff --git a/examples/docs/zh-CN/notification.md b/examples/docs/zh-CN/notification.md
index 0a68d2abd..ce0a6e3c0 100644
--- a/examples/docs/zh-CN/notification.md
+++ b/examples/docs/zh-CN/notification.md
@@ -95,6 +95,14 @@
});
},
+ open13() {
+ this.$notify.success({
+ title: 'Info',
+ message: '这是一条没有关闭按钮的消息',
+ showClose: false
+ });
+ },
+
onClose() {
console.log('Notification 已关闭');
}
@@ -348,6 +356,36 @@
`message` 属性虽然支持传入 HTML 片段,但是在网站上动态渲染任意 HTML 是非常危险的,因为容易导致 [XSS 攻击](https://en.wikipedia.org/wiki/Cross-site_scripting)。因此在 `dangerouslyUseHTMLString` 打开的情况下,请确保 `message` 的内容是可信的,**永远不要**将用户提交的内容赋值给 `message` 属性。
:::
+### 隐藏关闭按钮
+
+可以不显示关闭按钮
+
+::: demo 将`showClose`属性设置为`false`即可隐藏关闭按钮。
+```html
+
+