feat(docs): 顶栏导航按包显示版本标签#132
Merged
Merged
Conversation
将顶栏右侧单一全局版本号改为在各个包导航项(Components /
Markdown / Card / SDK / Skill)下方独立展示对应包版本:
- header.ts: 从各子包 package.json 读取 version,HeaderItem
增加 version 字段并填充
- header-navigation.vue: 导航项改为 column 布局,下方渲染
版本标签,含 hover/active 配色与移动端响应式
- header-actions.vue: 移除顶栏右侧全局 v{{ version }}
cc-hearts
added a commit
that referenced
this pull request
Jul 10, 2026
* feat(docs): 顶栏右侧按模块动态切换版本 将 #132 在各导航项下方展示的版本小标签改为顶栏右侧的 a-select 版本切换器(对齐 antdv-next 主站风格),并随当前模块切换显示对应子包版本: - 新增 useActiveHeaderItem composable:按当前路由解析激活的导航项及对应子包 version - header-navigation.vue:移除每个导航项下方的 versionTag 渲染与样式,恢复简洁横向导航 - header-actions.vue:右侧新增 a-select 版本切换器,currentVersion 跟随激活模块的 activeVersion 变化;无版本模块(研发/演示)自动隐藏;options 暂只含当前版本,为后续 versionList 多版本切换铺垫 * style(docs): 版本切换器去掉 v 前缀只显示版本号 * style(docs): 优化版本切换器宽度
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.
🤔 本次变更属于 ...
🔗 相关 Issue
💡 背景与方案
原先文档站顶栏右侧只有一个全局版本号
v{{ version }}(取自@antdv-next/x),无法区分 Components / Markdown / Card / SDK / Skill 各子包的实际版本。方案: 将全局版本号改为按包展示——在每个导航项正下方渲染对应包的版本标签。
header.ts:从各子包package.json读取version,HeaderItem新增可选version字段,并为 components / markdown / card / sdk / skill 五项填充;header-navigation.vue:导航项改为纵向布局,标签下方渲染版本号,含 hover / active 配色过渡与移动端(≤767.99px)响应式回退为静态排列;header-actions.vue:移除顶栏右侧原有的全局v{{ version }}。效果:各包版本一目了然,无需进入页面即可从顶栏感知版本差异。
📝 变更日志