Skip to content

Commit

Permalink
fix: fix version switch
Browse files Browse the repository at this point in the history
  • Loading branch information
MC-XiaoHei committed Dec 8, 2024
1 parent 207de0c commit 420d3db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/.vitepress/theme/versioning/VersionSwitcher.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ watch(
<div class="items">
<VPMenuLink v-if="!isLatest" :item="{
text: latestVersion,
link: `/../`,
link: `/../index`,
}"/>
<template v-for="version in versions" :key="version">
<VPMenuLink v-if="currentVersion != version" :item="{
text: version,
link: `${isLatest? '' : '/..'}/${version}/`,
link: `${isLatest? '' : '/..'}/${version}/index`,
}"/>
</template>
</div>
Expand All @@ -88,12 +88,12 @@ watch(
<div id="navbar-group-version" class="items">
<VPMenuLink :item="{
text: latestVersion,
link: `${isLatest? '' : '/..'}/`,
link: `${isLatest? '' : '/..'}/index`,
}"/>
<template v-for="version in versions" :key="version">
<VPMenuLink :item="{
text: version,
link: `${isLatest? '' : '/..'}/${version}/`,
link: `${isLatest? '' : '/..'}/${version}/index`,
}"/>
</template>
</div>
Expand Down

0 comments on commit 420d3db

Please sign in to comment.