mirror of https://github.com/ElemeFE/element
				
				
				
			Message/Notification: manage z-index with PopupManager
							parent
							
								
									9f945ad782
								
							
						
					
					
						commit
						5ee53016f7
					
				| 
						 | 
				
			
			@ -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);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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++) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue