test import
This commit is contained in:
parent
a25255b02d
commit
ecc1b8feec
|
@ -1,8 +1,8 @@
|
|||
import { renderPage } from 'vike/server'
|
||||
|
||||
// export const config = {
|
||||
// runtime: 'edge'
|
||||
// }
|
||||
export const config = {
|
||||
runtime: 'edge'
|
||||
}
|
||||
export default async function handler(req, res) {
|
||||
const { url, cookies } = req
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { createSignal, For, Show } from 'solid-js'
|
||||
import { For, Show } from 'solid-js'
|
||||
import { Icon } from '../Icon'
|
||||
import { register } from 'swiper/element/bundle'
|
||||
import { register } from 'swiper/element'
|
||||
import SwiperCore, { Manipulation, Navigation, Pagination } from 'swiper'
|
||||
import { SwiperRef } from './swiper'
|
||||
import { clsx } from 'clsx'
|
||||
|
@ -18,14 +18,8 @@ register()
|
|||
SwiperCore.use([Pagination, Navigation, Manipulation])
|
||||
|
||||
export const ArticleCardSwiper = (props: Props) => {
|
||||
const [slideIndex, setSlideIndex] = createSignal(0)
|
||||
|
||||
const mainSwipeRef: { current: SwiperRef } = { current: null }
|
||||
|
||||
const handleSlideChange = () => {
|
||||
setSlideIndex(mainSwipeRef.current.swiper.activeIndex)
|
||||
}
|
||||
|
||||
return (
|
||||
<div class={clsx(styles.Swiper, styles.articleMode, styles.ArticleCardSwiper)}>
|
||||
<Show when={props.title}>
|
||||
|
@ -38,7 +32,6 @@ export const ArticleCardSwiper = (props: Props) => {
|
|||
ref={(el) => (mainSwipeRef.current = el)}
|
||||
centered-slides={true}
|
||||
observer={true}
|
||||
onSlideChange={handleSlideChange}
|
||||
space-between={20}
|
||||
breakpoints={{
|
||||
576: { spaceBetween: 20, slidesPerView: 1.5 },
|
||||
|
|
|
@ -3,7 +3,7 @@ import { MediaItem, UploadedFile } from '../../../pages/types'
|
|||
import { Icon } from '../Icon'
|
||||
import { Popover } from '../Popover'
|
||||
import { useLocalize } from '../../../context/localize'
|
||||
import { register } from 'swiper/element/bundle'
|
||||
import { register } from 'swiper/element'
|
||||
import { DropArea } from '../DropArea'
|
||||
import { createFileUploader } from '@solid-primitives/upload'
|
||||
import SwiperCore, { Manipulation, Navigation, Pagination } from 'swiper'
|
||||
|
|
Loading…
Reference in New Issue
Block a user