diff --git a/examples/docs/en-US/notification.md b/examples/docs/en-US/notification.md
index 6298d25c..efa71f87 100644
--- a/examples/docs/en-US/notification.md
+++ b/examples/docs/en-US/notification.md
@@ -46,6 +46,14 @@
});
},
+ open7() {
+ this.$notify.success({
+ title: 'Success',
+ message: 'This is a success message',
+ offset: 100
+ });
+ },
+
onClose() {
console.log('Notification is closed');
}
@@ -165,6 +173,35 @@ We provide four types: success, warning, info and error.
```
:::
+### With offset
+
+Customize Notification's offset from the top edge of the screen
+
+::: demo Set the `offset` attribute to customize Notification's offset from the top edge of the screen. Note that every Notification instance of the same moment should have the same offset.
+```html
+
+
+ Notification with offset
+
+
+
+
+```
+
### 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.
@@ -187,6 +224,7 @@ In this case you should call `Notification(options)`. We have also registered me
| type | notification type | string | success/warning/info/error | — |
| duration | duration before close. It will not automatically close if set 0 | number | — | 4500 |
| onClose | callback function when closed | function | — | — |
+| 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.
diff --git a/examples/docs/zh-CN/notification.md b/examples/docs/zh-CN/notification.md
index 1cab8f1f..74a48050 100644
--- a/examples/docs/zh-CN/notification.md
+++ b/examples/docs/zh-CN/notification.md
@@ -47,10 +47,11 @@
},
open7() {
- this.$notify({
- message: '吴尔丹',
- origin: 100
- });
+ this.$notify.success({
+ title: '成功',
+ message: '这是一条成功的提示消息',
+ offset: 100
+ });
},
onClose() {
@@ -177,7 +178,7 @@
让 Notification 偏移一些位置
-::: demo Element Notification 组件提供设置偏移量的功能, 通过设置 `origin` 字段,可以使弹出的消息距屏幕上方偏移一段距离, 在同一时刻,所有的 Notification 实例应当只有同一个偏移量。
+::: demo Notification 提供设置偏移量的功能,通过设置 `offset` 字段,可以使弹出的消息距屏幕顶部偏移一段距离。注意在同一时刻,所有的 Notification 实例应当具有一个相同的偏移量。
```html