mirror of https://github.com/ElemeFE/element
Dialog: add closeOnDeactivated attribute
parent
17de41f3e2
commit
48754b716a
|
@ -88,6 +88,11 @@
|
|||
default: true
|
||||
},
|
||||
|
||||
closeOnDeactivated: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
|
||||
width: String,
|
||||
|
||||
fullscreen: Boolean,
|
||||
|
@ -202,6 +207,11 @@
|
|||
}
|
||||
},
|
||||
|
||||
deactivated() {
|
||||
if (!this.closeOnDeactivated || !this.visible) return;
|
||||
this.hide();
|
||||
},
|
||||
|
||||
destroyed() {
|
||||
// if appendToBody is true, remove DOM node after destroy
|
||||
if (this.appendToBody && this.$el && this.$el.parentNode) {
|
||||
|
|
Loading…
Reference in New Issue