Notification: add offset

This commit is contained in:
kingwl
2016-11-29 09:55:16 +08:00
committed by 杨奕
parent a8761eba34
commit 5aa4c5f00a
2 changed files with 39 additions and 1 deletions

View File

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