Skip to content

Commit

Permalink
PopupManager: fix z-index cannot be rewritten at first using (ElemeFE…
Browse files Browse the repository at this point in the history
…#15738)

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

* fix issue

* remove package.lock
  • Loading branch information
luckyCao authored and lzq4047 committed May 22, 2020
1 parent 691e23a commit 4db4374
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/popup/popup-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4db4374

Please sign in to comment.