From 46effe886689fad833eb0df600062f54ecf5bff4 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Sun, 1 Jun 2025 21:38:14 +0800 Subject: [PATCH] fix(theme): fix swiper slide link with `base` (#609) --- theme/src/client/features/components/Swiper.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/theme/src/client/features/components/Swiper.vue b/theme/src/client/features/components/Swiper.vue index f69a5e20..d08c1103 100644 --- a/theme/src/client/features/components/Swiper.vue +++ b/theme/src/client/features/components/Swiper.vue @@ -15,6 +15,7 @@ import { } from 'swiper/modules' import { Swiper, SwiperSlide } from 'swiper/vue' import { computed, onMounted } from 'vue' +import { withBase } from 'vuepress/client' import 'swiper/css' import 'swiper/css/navigation' @@ -68,8 +69,9 @@ const props = withDefaults(defineProps(), { const slideList = computed(() => { return props.items?.map((link) => { if (typeof link === 'string') - return { link } + return { link: withBase(link) } + link.link = withBase(link.link) return link }) ?? [] })