refactor: 改用router.push并清除路由守卫缓存替代window.location.href
- 添加resetInstallCheck()清除安装状态缓存 - 安装完成后调用resetInstallCheck再router.push跳转 - 保持SPA无刷新体验
This commit is contained in:
@@ -3,6 +3,11 @@ import type { Router } from 'vue-router'
|
||||
let installChecked = false
|
||||
let isInstalled = false
|
||||
|
||||
export function resetInstallCheck() {
|
||||
installChecked = false
|
||||
isInstalled = false
|
||||
}
|
||||
|
||||
async function checkInstallStatus(): Promise<boolean> {
|
||||
if (installChecked) return isInstalled
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user