refactor: update project structure and content
This commit is contained in:
1 parent
cdbe3bb51e
commit
95d594c2aa
44 files changed
+47
-988
No files matched your search
+4
-8
@@ -1,5 +1,4 @@
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import initialPageImage from "@/assets/images/初始页.png";
|
||||
import { BackgroundImage, Image } from "@/components";
|
||||
import { getStaticImage } from "@/utils";
|
||||
|
||||
@@ -8,22 +7,19 @@ export default function Home() {
|
||||
|
||||
const handleStartExperiment = () => {
|
||||
console.log("点击开启实验");
|
||||
navigate("/experiment");
|
||||
navigate("/menu");
|
||||
};
|
||||
|
||||
return (
|
||||
<BackgroundImage
|
||||
src={initialPageImage}
|
||||
alt="传感器实验首页"
|
||||
src={getStaticImage("home/进入页.png")}
|
||||
className="h-full w-full relative"
|
||||
backgroundSize="cover"
|
||||
backgroundPosition="center"
|
||||
onLoad={() => console.log("背景图片加载完成")}
|
||||
onError={() => console.log("背景图片加载失败")}
|
||||
>
|
||||
<Image
|
||||
src={getStaticImage("home/按钮-开启实验.png")}
|
||||
alt="开始实验按钮"
|
||||
src={getStaticImage("components/按钮-进入.png")}
|
||||
alt="进入"
|
||||
button
|
||||
className="absolute bottom-10 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
|
||||
onClick={handleStartExperiment}
|
||||
|
||||
Reference in new issue
Block a user