mirror of https://github.com/ElemeFE/element
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.lockpull/16135/head
parent
b9ecabbf05
commit
c588b64fa1
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue