perf(frontend): 收敛导航预取并去重首屏请求

- 导航预取仅保留 pointerdown 触发,移除 mouseenter/focus,避免鼠标划过误触发
- 后台预取只做组件懒加载,不再预取各页业务数据,减少首屏资源争抢
- 版本状态检查增加 sessionStorage 缓存(正常 20 分钟 / 错误 5 分钟 TTL)
- fetchModules、必读公告拉取增加请求去重,避免并发重复请求
- 更新检查改用可清理的定时器,组件卸载时清理
- UsageRecordsTable 搜索防抖改为自定义实现,卸载时取消挂起 emit 并补充测试
This commit is contained in:
elky
2026-07-01 20:42:52 +08:00
parent a0f7074e59
commit 2e5ff32e1a
6 changed files with 158 additions and 110 deletions
@@ -29,8 +29,6 @@
? 'bg-primary/10 text-primary font-medium'
: 'text-muted-foreground hover:text-foreground hover:bg-muted/50'
]"
@mouseenter="emit('prefetch', item.href)"
@focus="emit('prefetch', item.href)"
@pointerdown="emit('prefetch', item.href)"
@click="handleNavigate(item.href)"
>