[bugfix] Popup: overlay may cover popup in some cases (#3831)

This commit is contained in:
neverland
2019-07-11 20:13:04 +08:00
committed by GitHub
parent 35ccebeea2
commit 32f19c5561
2 changed files with 10 additions and 9 deletions
+4 -3
View File
@@ -44,9 +44,10 @@ export function updateOverlay(): void {
const { vm, config } = context.top;
const el = vm.$el;
const target = el && el.parentNode ? el.parentNode : document.body;
if (target) {
target.appendChild(overlay.$el);
if (el && el.parentNode) {
el.parentNode.insertBefore(overlay.$el, el);
} else {
document.body.appendChild(overlay.$el);
}
Object.assign(overlay, defaultConfig, config, {