mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user