Dialog: only destroy slot when destroyOnClose is true

pull/19753/head
guoweijian 2020-06-30 10:00:42 +08:00
parent bf534d977e
commit d23c7160f5
1 changed files with 2 additions and 6 deletions

View File

@ -9,7 +9,6 @@
@click.self="handleWrapperClick">
<div
role="dialog"
:key="key"
aria-modal="true"
:aria-label="title || 'dialog'"
:class="['el-dialog', { 'is-fullscreen': fullscreen, 'el-dialog--center': center }, customClass]"
@ -112,8 +111,7 @@
data() {
return {
closed: false,
key: 0
closed: false
};
},
@ -133,9 +131,7 @@
this.$el.removeEventListener('scroll', this.updatePopper);
if (!this.closed) this.$emit('close');
if (this.destroyOnClose) {
this.$nextTick(() => {
this.key++;
});
this.rendered = false;
}
}
}