PopupManager: fix z-index cannot be rewritten at first using (#15738)

* PopupManager: fix z-index value cannot be rewritten at initial render (#15074)

* fix issue

* remove package.lock
pull/16135/head
luckyCao 2019-06-24 16:33:13 +08:00 committed by Zhi Cun
parent b9ecabbf05
commit c588b64fa1
1 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import { addClass, removeClass } from 'element-ui/src/utils/dom';
let hasModal = false;
let hasInitZIndex = false;
let zIndex = 2000;
let zIndex;
const getModal = function() {
if (Vue.prototype.$isServer) return;
@ -155,7 +155,7 @@ Object.defineProperty(PopupManager, 'zIndex', {
configurable: true,
get() {
if (!hasInitZIndex) {
zIndex = (Vue.prototype.$ELEMENT || {}).zIndex || zIndex;
zIndex = zIndex || (Vue.prototype.$ELEMENT || {}).zIndex || 2000;
hasInitZIndex = true;
}
return zIndex;