mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
fix(theme): fix swiper slide link with base (#609)
This commit is contained in:
parent
7ed3f6ffd1
commit
46effe8866
@ -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<Props>(), {
|
||||
const slideList = computed<SlideItem[]>(() => {
|
||||
return props.items?.map((link) => {
|
||||
if (typeof link === 'string')
|
||||
return { link }
|
||||
return { link: withBase(link) }
|
||||
|
||||
link.link = withBase(link.link)
|
||||
return link
|
||||
}) ?? []
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user