mirror of https://github.com/ElemeFE/element
Dialog: only destroy slot when destroyOnClose is true
parent
bf534d977e
commit
d23c7160f5
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue