🐛 修复页面刷新时UI闪烁问题

- 添加appReady状态控制应用显示时机
- 在checkLoginStatus完成后才显示主界面
- 添加加载占位符动画(云图标脉冲效果)
- 使用v-if/v-else确保UI状态一致性

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-30 11:07:07 +08:00
parent 9f0f8f69af
commit c4d3c15403
2 changed files with 39 additions and 0 deletions

View File

@@ -7,6 +7,9 @@ createApp({
// API配置 - 通过nginx代理访问
apiBase: window.location.protocol + '//' + window.location.host,
// 应用状态
appReady: false, // 应用是否初始化完成防止UI闪烁
// 用户状态
isLoggedIn: false,
user: null,
@@ -1087,6 +1090,9 @@ handleDragLeave(e) {
}
// 清理可能残留的用户信息
localStorage.removeItem('user');
} finally {
// 无论登录验证成功还是失败,都标记应用已准备就绪
this.appReady = true;
}
},