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
pull/9155/merge
Allenice 2018-01-05 12:31:51 +08:00 committed by 杨奕
parent 931249bad6
commit 5e06a1a463
1 changed files with 7 additions and 0 deletions

View File

@ -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>