fix: 修复文档站历史版本切换异常#929
Open
yunye-ygx wants to merge 2 commits into
Open
Conversation
added 2 commits
April 18, 2026 17:57
- 为版本选择下拉菜单中的链接添加了缺失的前导斜杠 - 确保版本跳转路径正确,避免页面跳转错误 - 保持文档结构和样式未变,提高用户访问体验
- 移除静态版本选择下拉框的硬编码内容 - 新增版本切换器脚本,实现动态生成版本选项 - 支持最新版本和历史版本的统一版本列表展示 - 保证切换版本时保持当前页面hash值不变 - 添加多个单元测试覆盖版本切换器逻辑 - 页面初始化时自动加载版本切换器并绑定事件
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.
变更说明
本次修改统一了文档站的版本切换逻辑,修复了部分历史版本页面切换异常的问题。
主要变更
/doc.html与/doc/index.html两种历史文档路径修复问题
验证方式
node --test sa-token-doc/static/doc-version-switcher.test.cjsv1.30.0 -> 最新版可以正常跳转