Notification: improve offset attribute doc

This commit is contained in:
Leopoldthecoder
2016-11-29 18:40:10 +08:00
parent 5aa4c5f00a
commit 2676bbaa5a
3 changed files with 52 additions and 12 deletions

View File

@@ -25,8 +25,8 @@ var Notification = function(options) {
instance.dom = instance.vm.$el;
instance.dom.style.zIndex = PopupManager.nextZIndex();
const origin = options.origin || 0;
let topDist = origin;
const offset = options.offset || 0;
let topDist = offset;
for (let i = 0, len = instances.length; i < len; i++) {
topDist += instances[i].$el.offsetHeight + 16;
}