MessageBox: wrap hashchange listener in nextTick (#11200)

pull/11205/head
hetech 2018-05-17 12:25:43 +08:00 committed by 杨奕
parent c6e9cdac88
commit b79a98c7e0
1 changed files with 5 additions and 3 deletions

View File

@ -273,9 +273,11 @@
},
mounted() {
if (this.closeOnHashChange) {
window.addEventListener('hashchange', this.close);
}
this.$nextTick(() => {
if (this.closeOnHashChange) {
window.addEventListener('hashchange', this.close);
}
});
},
beforeDestroy() {