|
@@ -4,6 +4,7 @@ import Footer from "@/components/Footer";
|
|
|
import Header from "@/components/Header";
|
|
|
import Sidebar from "@/components/Layout/Sidebar";
|
|
|
import styles from "@/components/Layout/style.module.scss";
|
|
|
+import { SpinLoading } from "antd-mobile";
|
|
|
import { FC, PropsWithChildren, ReactNode, useRef } from "react";
|
|
|
import { Swiper, SwiperClass, SwiperSlide } from "swiper/react";
|
|
|
type Props = {
|
|
@@ -53,23 +54,26 @@ const Layout: FC<PropsWithChildren<Props>> = (props) => {
|
|
|
<>
|
|
|
<Swiper
|
|
|
resistanceRatio={10}
|
|
|
- initialSlide={1}
|
|
|
+ initialSlide={2}
|
|
|
slidesPerView={"auto"}
|
|
|
onSlidePrevTransitionStart={startHandler}
|
|
|
onSlideNextTransitionEnd={endHandler}
|
|
|
slideToClickedSlide
|
|
|
onSwiper={(swiper) => {
|
|
|
swiperRef.current = swiper;
|
|
|
- // 设置第一个元素
|
|
|
- swiper.slides[0].style.display = "block";
|
|
|
}}
|
|
|
runCallbacksOnInit={false}
|
|
|
allowTouchMove={false}
|
|
|
+ observer={true}
|
|
|
+ observeParents={true}
|
|
|
>
|
|
|
- <SwiperSlide
|
|
|
- style={{ width: `${"70%"}`, display: "none" }}
|
|
|
- className={"bg-[rgb(31,31,31)]"}
|
|
|
- >
|
|
|
+ <SwiperSlide>
|
|
|
+ <section className="relative flex h-[100vh] items-center justify-center">
|
|
|
+ <SpinLoading color="default" />
|
|
|
+ </section>
|
|
|
+ </SwiperSlide>
|
|
|
+
|
|
|
+ <SwiperSlide style={{ width: "70%" }} className={"bg-[rgb(31,31,31)]"}>
|
|
|
<section className="relative h-[100vh]">
|
|
|
<Sidebar></Sidebar>
|
|
|
</section>
|