Merge pull request #828 from Leopoldthecoder/message-zindex

Message/Notification: manage z-index with PopupManager
This commit is contained in:
FuryBean 2016-11-04 19:19:32 +08:00 committed by GitHub
commit 92bbc55cd3
4 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,5 @@
import Vue from 'vue';
import { PopupManager } from 'vue-popup';
let MessageConstructor = Vue.extend(require('./main.vue'));
let instance;
@ -27,6 +28,7 @@ var Message = function(options) {
document.body.appendChild(instance.vm.$el);
instance.vm.visible = true;
instance.dom = instance.vm.$el;
instance.dom.style.zIndex = PopupManager.nextZIndex();
instances.push(instance);
};

View File

@ -1,4 +1,5 @@
import Vue from 'vue';
import { PopupManager } from 'vue-popup';
let NotificationConstructor = Vue.extend(require('./main.vue'));
let instance;
@ -22,6 +23,7 @@ var Notification = function(options) {
document.body.appendChild(instance.vm.$el);
instance.vm.visible = true;
instance.dom = instance.vm.$el;
instance.dom.style.zIndex = PopupManager.nextZIndex();
let topDist = 0;
for (let i = 0, len = instances.length; i < len; i++) {

View File

@ -16,7 +16,6 @@
background-color: #fff;
transition: opacity 0.3s, transform .4s;
overflow: hidden;
z-index: var(--index-popper);
@e group {
margin-left: 38px;

View File

@ -14,7 +14,6 @@
box-shadow: var(--notification-shadow);
transition: opacity 0.3s, transform .3s, right .3s, top 0.4s;
overflow: hidden;
z-index: var(--index-popper);
@e group {
& span {