Skip to content

Commit 76532d3

Browse files
authored
Update DownloadPage.vue
1 parent 3113922 commit 76532d3

1 file changed

Lines changed: 33 additions & 3 deletions

File tree

docs/.vitepress/theme/components/DownloadPage.vue

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@
4848
</footer>
4949
</article>
5050
</div>
51+
52+
<div class="release-navigation">
53+
<button class="btn btn--outlined" :disabled="currentIndex === 0" @click="prevRelease">
54+
<span class="material-symbols-outlined">arrow_back</span>
55+
<span>上一版</span>
56+
</button>
57+
<span class="typescale-body-medium card-subtitle">{{ currentIndex + 1 }} / {{ paginatedReleases.length }}</span>
58+
<button class="btn btn--outlined" :disabled="currentIndex === paginatedReleases.length - 1" @click="nextRelease">
59+
<span>下一版</span>
60+
<span class="material-symbols-outlined">arrow_forward</span>
61+
</button>
62+
</div>
5163
</div>
5264

5365
<dialog class="modal" ref="downloadModalRef">
@@ -284,6 +296,18 @@ const toggleBeta = async () => {
284296
loading.value = false;
285297
};
286298
299+
const prevRelease = () => {
300+
if (currentIndex.value > 0) {
301+
currentIndex.value--;
302+
}
303+
};
304+
305+
const nextRelease = () => {
306+
if (currentIndex.value < paginatedReleases.value.length - 1) {
307+
currentIndex.value++;
308+
}
309+
};
310+
287311
// --- 初始化 ---
288312
onMounted(async () => {
289313
// 智教镜像检测
@@ -606,8 +630,8 @@ onMounted(async () => {
606630
/* 通用布局与组件 */
607631
.download-container {
608632
padding: 1rem;
609-
max-width: 1200px;
610-
margin: 0;
633+
max-width: 900px;
634+
margin: 0 auto;
611635
color: var(--md-sys-color-on-surface);
612636
font-family: var(--md-sys-typescale-font-family);
613637
}
@@ -641,6 +665,13 @@ onMounted(async () => {
641665
gap: 1rem;
642666
padding: 4rem 0;
643667
}
668+
.release-navigation {
669+
display: flex;
670+
align-items: center;
671+
justify-content: center;
672+
gap: 1rem;
673+
padding: 1rem 0;
674+
}
644675
.modal {
645676
position: fixed;
646677
top: 0; left: 0; right: 0; bottom: 0;
@@ -710,7 +741,6 @@ onMounted(async () => {
710741
display: grid;
711742
grid-template-columns: 1fr;
712743
gap: 1.5rem;
713-
justify-items: start;
714744
}
715745
@media (min-width: 768px) {
716746
.release-grid {

0 commit comments

Comments
 (0)