mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-13 11:34:02 +08:00
Dialog: remove DOM node after destroyed when appendToBody (#9005)
* Form: fix async validate bug * Form: fix async validate bug * When dialo's <appendToBody> is true, remove DOM node after destory
This commit is contained in:
@@ -177,6 +177,13 @@
|
||||
document.body.appendChild(this.$el);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
destroyed() {
|
||||
// if appendToBody is true, remove DOM node after destroy
|
||||
if (this.appendToBody && this.$el) {
|
||||
this.$el.parentNode.removeChild(this.$el);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user