You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
438 B

<template>
<div id="app">
<router-view />
</div>
</template>
<script>
const beforeUnload = function (e) {
e = e || window.event
if (e || window.event) e.returnValue = 1;
return 1;
}
export default {
name: 'App',
mounted() {
this.$nextTick(() => {
window.addEventListener('beforeunload', beforeUnload)
})
},
beforeDestroy() {
window.removeEventListener('beforeunload', beforeUnload)
}
}
</script>