From 4db437426c755c85651164aa93a3f24e88e86e97 Mon Sep 17 00:00:00 2001 From: luckyCao Date: Mon, 24 Jun 2019 16:33:13 +0800 Subject: [PATCH] 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 --- src/utils/popup/popup-manager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/popup/popup-manager.js b/src/utils/popup/popup-manager.js index 2d18ef18fc..598f8b84da 100644 --- a/src/utils/popup/popup-manager.js +++ b/src/utils/popup/popup-manager.js @@ -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;