修改刷新逻辑

This commit is contained in:
liaozetao
2023-10-17 16:19:28 +08:00
parent e1559b65e1
commit 881fd6af53

View File

@@ -8,12 +8,12 @@ import router from '@/router';
export default {
name: 'BlankView',
created() {
console.log(window.performance.navigation.type == window.performance.navigation.TYPE_RELOAD);
//处理css样式污染问题
if (window.performance.navigation.type == window.performance.navigation.TYPE_RELOAD) {
if (window.performance.navigation.type != window.performance.navigation.TYPE_RELOAD) {
router.go(0);
} else {
router.push('/home');
}
window.location.reload();
}
}
</script>