if (window.performance.navigation.type == 1) {
console.log("页面被刷新");
this.routeChangeFlag = false;
}else{
console.log("首次被加载");
this.routeChangeFlag = true;
}
vue 如何实现判断页面是再次刷新还是首次进入
于 2023-03-17 10:43:25 首次发布
if (window.performance.navigation.type == 1) {
console.log("页面被刷新");
this.routeChangeFlag = false;
}else{
console.log("首次被加载");
this.routeChangeFlag = true;
}