confirm reload in admin view
This commit is contained in:
parent
3d62486783
commit
bf6d72147e
1 changed files with 12 additions and 1 deletions
|
@ -18,5 +18,16 @@ import DoorMapEditor from "./DoorMapEditor.vue";
|
|||
DoorMapEditor,
|
||||
},
|
||||
})
|
||||
export default class extends Vue {}
|
||||
export default class extends Vue {
|
||||
private old_handler = window.onbeforeunload;
|
||||
private confirm_handler = () => "";
|
||||
|
||||
public mounted(): void {
|
||||
window.onbeforeunload = this.confirm_handler;
|
||||
}
|
||||
|
||||
public beforeUnmount(): void {
|
||||
window.onbeforeunload = this.old_handler;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue