mirror of https://github.com/ElemeFE/element
MessageBox: wrap hashchange listener in nextTick (#11200)
parent
c6e9cdac88
commit
b79a98c7e0
|
@ -273,9 +273,11 @@
|
|||
},
|
||||
|
||||
mounted() {
|
||||
if (this.closeOnHashChange) {
|
||||
window.addEventListener('hashchange', this.close);
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (this.closeOnHashChange) {
|
||||
window.addEventListener('hashchange', this.close);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
|
Loading…
Reference in New Issue