Skip to content

Commit 4db4374

Browse files
luckyCaolzq4047
authored andcommitted
PopupManager: fix z-index cannot be rewritten at first using (ElemeFE#15738)
* PopupManager: fix z-index value cannot be rewritten at initial render (ElemeFE#15074) * fix issue * remove package.lock
1 parent 691e23a commit 4db4374

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/popup/popup-manager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { addClass, removeClass } from 'element-ui/src/utils/dom';
33

44
let hasModal = false;
55
let hasInitZIndex = false;
6-
let zIndex = 2000;
6+
let zIndex;
77

88
const getModal = function() {
99
if (Vue.prototype.$isServer) return;
@@ -155,7 +155,7 @@ Object.defineProperty(PopupManager, 'zIndex', {
155155
configurable: true,
156156
get() {
157157
if (!hasInitZIndex) {
158-
zIndex = (Vue.prototype.$ELEMENT || {}).zIndex || zIndex;
158+
zIndex = zIndex || (Vue.prototype.$ELEMENT || {}).zIndex || 2000;
159159
hasInitZIndex = true;
160160
}
161161
return zIndex;

0 commit comments

Comments
 (0)