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