Conversation
公开榜不再一次拉全量。限时 / 计时两列各自请求 GET /api/leaderboard?type=&page=&pageSize=100,用 IntersectionObserver 在列内滚动追加;名次按当前累加列表下标计算,避免翻页后错位。 人数与本人 - 标题旁展示「共 n 人(同一个人只算最快一次)」,悬停用项目 Tooltip 说明规则 - 第一页响应带 mine:可点「我的排名 第 N 名」筛选只看自己,高亮当前用户行 - 名次查询失败显示「排名暂不可用」,不再把 SQL/身份错误误报成「暂未上榜」 - 登录优先按 userId 对上自己;历史只有 userName 的旧记录也能回落到本人 交互 - 抽出 LeaderBoardPanel,两列共用滚动容器、哨兵和标题区 - 空榜 / 加载中 / 加载失败可点重试;追加失败不会让 observer 卡死 - 规则说明走 Tooltip 文本和 content slot,排行榜不再 v-html - 「我的排名」改用 Tooltip,去掉原生 title - Tooltip 增加 wrap 与具名 content 插槽,长文案可以换行 接口 - getLeaderBoard 改为带 type/page/pageSize - 保存成绩仍提交字段,注释标明身份以服务端 cookie / IP 为准 i18n 补 empty_leaderboard、player_count、my_rank、my_rank_n、 not_on_leaderboard、rank_unavailable、load_more_failed。
Owner
Author
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
公开榜不再一次拉全量。限时 / 计时两列各自请求
GET /api/leaderboard?type=&page=&pageSize=100,用 IntersectionObserver 在列内滚动追加;名次按当前累加列表下标计算,避免翻页后错位。
人数与本人
交互
接口
i18n 补 empty_leaderboard、player_count、my_rank、my_rank_n、 not_on_leaderboard、rank_unavailable、load_more_failed。